MagmaDNN  1.0
c++NeuralNetworkFramework
magmadnn::layer::Layer< T > Class Template Referenceabstract
Inheritance diagram for magmadnn::layer::Layer< T >:
Collaboration diagram for magmadnn::layer::Layer< T >:

Public Member Functions

virtual std::vector< op::Operation< T > * > get_weights ()=0
 
virtual op::Operation< T > * out ()
 
op::Operation< T > * get_input ()
 
op::Operation< T > * get_output ()
 
std::vector< unsigned int > get_input_shape () const
 
std::vector< unsigned int > get_output_shape () const
 
unsigned int get_input_shape (unsigned int i) const
 
unsigned int get_output_shape (unsigned int i) const
 
void set_name (std::string name)
 
std::string get_name () const
 

Protected Member Functions

 Layer (std::vector< unsigned int > input_shape, op::Operation< T > *input)
 

Protected Attributes

std::vector< unsigned int > input_shape
 
std::vector< unsigned int > output_shape
 
op::Operation< T > * input
 
op::Operation< T > * output
 
std::string name
 

Member Function Documentation

◆ get_input()

template<typename T >
op::Operation<T>* magmadnn::layer::Layer< T >::get_input ( )
inline

Get the pointer to the input tensor for this layer

Returns
tensor<T>*

◆ get_input_shape() [1/2]

template<typename T >
std::vector<unsigned int> magmadnn::layer::Layer< T >::get_input_shape ( ) const
inline

Returns a copy of the input shape as a vector

Returns
std::vector<unsigned int>

◆ get_input_shape() [2/2]

template<typename T >
unsigned int magmadnn::layer::Layer< T >::get_input_shape ( unsigned int  i) const
inline

Gets the size of the i-th axis of the input tensor

Parameters
iaxis
Returns
std::vector<unsigned int>

◆ get_name()

template<typename T >
std::string magmadnn::layer::Layer< T >::get_name ( ) const
inline

Returns the name of this layer. Defaults to the layer type if not set on its own.

Returns
std::string the name of this layer.

◆ get_output()

template<typename T >
op::Operation<T>* magmadnn::layer::Layer< T >::get_output ( )
inline

Get the pointer to the output tensor for this layer

Returns
tensor<T>*

◆ get_output_shape() [1/2]

template<typename T >
std::vector<unsigned int> magmadnn::layer::Layer< T >::get_output_shape ( ) const
inline

Returns a copy of the output shape as a vector

Returns
std::vector<unsigned int>

◆ get_output_shape() [2/2]

template<typename T >
unsigned int magmadnn::layer::Layer< T >::get_output_shape ( unsigned int  i) const
inline

Gets the size of the i-th axis of the output tensor

Parameters
iaxis
Returns
std::vector<unsigned int>

◆ set_name()

template<typename T >
void magmadnn::layer::Layer< T >::set_name ( std::string  name)
inline

Set the name of this layer.

Parameters
namename to assign to this layer

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