DLPrimitives
Public Member Functions | Friends | List of all members
dlprim::TensorSpecs Class Reference

Definition of Tensor without actual memory/object. More...

#include <include/dlprim/tensor.hpp>

Public Member Functions

 TensorSpecs (Shape const &s=Shape(), DataType d=float_data, bool trainable=true)
 Specifications defined by shape, data type,. More...
 
bool operator== (TensorSpecs const &other) const
 
bool operator!= (TensorSpecs const &other) const
 
Shape const & shape () const
 get tensor shape
 
void shape (Shape const &s)
 
bool is_trainable () const
 return if tensor need to participate in gradient decent
 
void freeze ()
 Mark tensor as one that does not participate in gradients calculations.
 
void is_trainable (bool v)
 set - non-trainable property
 
size_t memory_size () const
 Get reuired memory size for the tensor.
 
DataType dtype () const
 

Friends

class Tensor
 

Detailed Description

Definition of Tensor without actual memory/object.

Constructor & Destructor Documentation

dlprim::TensorSpecs::TensorSpecs ( Shape const &  s = Shape(),
DataType  d = float_data,
bool  trainable = true 
)
inline

Specifications defined by shape, data type,.

flag trainable marks that specific tensor must not participate in gradient decent calculations it is non-trainable parameter - for example Batch Normalization's running_var/running_mean

References dlprim::is_floating_point_data_type().


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