Nir.TensorSourceTensors are multidimensional arrays used to represent numerical such as a neural network paramters.
This library relies on Bigarray.Genarray to instanciante tensors.
get t idx returns the value in tensor t stored at coordinates idx. Throw an error if the coordinate is invalid.
set_idx t idx v sets value v for tensor t at idx. Throw an error if the coordinate is invalid.
create_1_float f returns an unidimentional tensor with one floating point value f.
create_1_int64 i returns an unidimentional tensor with one int64 value i.
val reshape :
Shape.t ->
('a, 'b, Bigarray.c_layout) Bigarray.Genarray.t ->
('a, 'b, Bigarray.c_layout) Bigarray.Genarray.t