Class Tensor๏ƒ

class Tensor๏ƒ

Basic tensor class.

Tensor defines a basic interface for creating and manipulating tensors. To create tensors you should use the Constructors. These can be used on their own or chained together with the Setters to create the desired tensor.

For example

Tensor = ones({3,3}).dType(dtypes::kFloat).device(dtypes::kGPU);
will get you a 3x3 tensor of floats that lives on the GPU. This is equivalent to
Tensor = ones({3,3}, dtypes::kFloat, dtypes::kGPU);