MagmaDNN  1.0
c++NeuralNetworkFramework
variable.h File Reference
#include <string>
#include <tensor/tensor.h>
#include "operation.h"
Include dependency graph for variable.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  magmadnn::op::Variable< T >
 

Functions

template<typename T >
Variable< T > * magmadnn::op::var (std::string name, Tensor< T > *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<typename T >
Variable< T > * magmadnn::op::scalar (std::string name, T val, memory_t mem_type)
 

Detailed Description

Author
Daniel Nichols
Version
1.0
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>*