SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
|
The base class of all Tensor objects. More...
#include <tensor.h>
The base class of all Tensor objects.
This contains common properties used by all Tensor implementations, like name, shape, and data type, but it does not contain the data itself. Subclasses are responsible for designing, allocating, and managing data storage.
Public Member Functions | |
TensorBase (const std::string &_name, const TensorShape &_shape) | |
TensorBase (const TensorProto &tensorProto) | |
std::string | getName () const |
const TensorShape & | getShape () const |
int | ndims () const |
int | dim (int index) const |
int | getTotalDim (int index) const |
int | getDataStorageFormat () const |
DataType | getDataType () const |
int | getDataTypeSize () const |
bool | isDead () const |
void | setDead (bool _dead=true) |
virtual bool | containsData () const =0 |
Protected Attributes | |
std::string | name |
Name of of the Tensor. More... | |
TensorShape | shape |
Shape of the Tensor. | |
DataStorageFormat | dataFormat |
Indicates the compression format of the data. More... | |
DataType | dataType |
bool | dead |
If true, the tensor is dead, which means it is on an untaken control flow path. More... | |
|
protected |
|
protected |
|
protected |