LBANN  0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
lbann::transform::pad Class Reference

#include <pad.hpp>

Inheritance diagram for lbann::transform::pad:
[legend]
Collaboration diagram for lbann::transform::pad:
[legend]

Public Member Functions

 pad (size_t p)
 
transformcopy () const override
 
std::string get_type () const override
 
void apply (utils::type_erased_matrix &data, std::vector< size_t > &dims) override
 
- Public Member Functions inherited from lbann::transform::transform
 transform ()=default
 
 transform (const transform &)=default
 
transformoperator= (const transform &)=default
 
virtual ~transform ()=default
 
virtual description get_description () const
 
virtual bool supports_non_inplace () const
 
virtual void apply (utils::type_erased_matrix &data, CPUMat &out, std::vector< size_t > &dims)
 

Private Attributes

size_t m_p
 

Additional Inherited Members

- Static Protected Member Functions inherited from lbann::transform::transform
static float get_uniform_random (float a, float b)
 
static bool get_bool_random (float p)
 
static El::Int get_uniform_random_int (El::Int a, El::Int b)
 

Detailed Description

Pad an image.

Definition at line 38 of file pad.hpp.

Constructor & Destructor Documentation

◆ pad()

lbann::transform::pad::pad ( size_t  p)
inline

Pad p on all size.

Definition at line 42 of file pad.hpp.

Here is the caller graph for this function:

Member Function Documentation

◆ apply()

void lbann::transform::pad::apply ( utils::type_erased_matrix data,
std::vector< size_t > &  dims 
)
overridevirtual

Apply the transform to data.

Parameters
dataThe input data to transform, which is modified in-place. The matrix shuold be contiguous.
dimsThe dimensions of the data tensor. For "plain data", dims should have one entry, giving its size. For images, dims should have three entries: channels, height, width.
Note
dims is a hack until we have proper tensors.

Implements lbann::transform::transform.

Here is the caller graph for this function:

◆ copy()

transform* lbann::transform::pad::copy ( ) const
inlineoverridevirtual

Create a copy of the transform instance.

Implements lbann::transform::transform.

Definition at line 44 of file pad.hpp.

Here is the call graph for this function:

◆ get_type()

std::string lbann::transform::pad::get_type ( ) const
inlineoverridevirtual

Human-readable type name.

Implements lbann::transform::transform.

Definition at line 46 of file pad.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ m_p

size_t lbann::transform::pad::m_p
private

Pad for the image.

Definition at line 53 of file pad.hpp.


The documentation for this class was generated from the following file: