Class Tensors

Class Documentation

class Tensors

The whole tensor set in the graph.

Holds all tensor objects (memory and nodes) for a graph.

Public Functions

Tensors(Ptr<Backend> backend)
Tensors(Ptr<Backend> backend, Ptr<Device> device)
void reserve(size_t bytes)
void throwAtReallocation(bool throwAtRealloc)
void allocateForward(Expr node)
void allocateBackward(Expr node)
void free(const Tensor &tensor)
Ptr<Allocator> getAllocator()
Ptr<TensorAllocator> getTensorAllocator()
Expr findOrRemember(Expr node)
void clear()
void clearShorttermMemory()
void clearLongtermMemory()