#include <string>
#include <tensor/tensor.h>
#include "operation.h"
Go to the source code of this file.
|
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) |
|
- Author
- Daniel Nichols
- Version
- 1.0
- Date
- 2019-02-18
- Copyright
- Copyright (c) 2019
◆ scalar()
template<typename T >
Variable< T > * magmadnn::op::scalar |
( |
std::string |
name, |
|
|
T |
val, |
|
|
memory_t |
mem_type |
|
) |
| |
Creates a scalar variable.
- Template Parameters
-
- Parameters
-
- Returns
- Variable<T>*
◆ 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
-
- Parameters
-
name | the name of the variable. This does not effect computation. It will allow to_string() methods to work, however. |
val | tensor to wrap around |
- Returns
- Variable<T>*
◆ 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
-
- Parameters
-
name | |
shape | |
filler | |
mem_type | |
- Returns
- Variable<T>*