MagmaDNN  1.0
c++NeuralNetworkFramework
variable.cpp File Reference
#include "compute/variable.h"
Include dependency graph for variable.cpp:

Functions

template<typename T >
Variable< T > * magmadnn::op::var (std::string name, Tensor< T > *val)
 
template Variable< int > * magmadnn::op::var (std::string name, Tensor< int > *val)
 
template Variable< float > * magmadnn::op::var (std::string name, Tensor< float > *val)
 
template Variable< double > * magmadnn::op::var (std::string name, Tensor< double > *val)
 
template<typename T >
Variable< T > * magmadnn::op::var (std::string name, std::vector< unsigned int > shape, tensor_filler_t< T > filler, memory_t mem_type)
 
template Variable< int > * magmadnn::op::var (std::string, std::vector< unsigned int >, tensor_filler_t< int >, memory_t mem_type)
 
template Variable< float > * magmadnn::op::var (std::string, std::vector< unsigned int >, tensor_filler_t< float >, memory_t mem_type)
 
template Variable< double > * magmadnn::op::var (std::string, std::vector< unsigned int >, tensor_filler_t< double >, memory_t mem_type)
 
template<typename T >
Variable< T > * magmadnn::op::scalar (std::string name, T val, memory_t mem_type)
 
template Variable< int > * magmadnn::op::scalar (std::string, int, memory_t mem_type)
 
template Variable< float > * magmadnn::op::scalar (std::string, float, memory_t mem_type)
 
template Variable< double > * magmadnn::op::scalar (std::string, double, memory_t mem_type)
 

Detailed Description

Author
Daniel Nichols
Version
0.1
Date
2019-02-18

Function Documentation

◆ scalar()

template<typename T >
Variable< T > * magmadnn::op::scalar ( std::string  name,
val,
memory_t  mem_type 
)

Creates a scalar variable.

Template Parameters
T
Parameters
name
val
mem_type
Returns
Variable<T>*
Here is the caller graph for this function:

◆ var() [1/2]

template<typename T >
Variable< T > * magmadnn::op::var ( std::string  name,
Tensor< T > *  val 
)

Returns a new variable operation. The variable wraps around val with name name.

Template Parameters
T
Parameters
namethe name of the variable. This does not effect computation. It will allow to_string() methods to work, however.
valtensor to wrap around
Returns
Variable<T>*
Here is the caller graph for this function:

◆ var() [2/2]

template<typename T >
Variable< T > * magmadnn::op::var ( std::string  name,
std::vector< unsigned int >  shape,
tensor_filler_t< T >  filler,
memory_t  mem_type 
)

Returns a new variable operation. This version constructs a new tensor to store in the variable.

Template Parameters
T
Parameters
name
shape
filler
mem_type
Returns
Variable<T>*