Tensor


Description:

[ CCode ( has_construct_function = false ) ]
[ Version ( since = "0.3.0" ) ]
public Tensor (DataType data_type, Buffer data, int64[] shape, int64[]? strides, string[]? dimension_names)

Parameters:

data_type

A DataType that indicates each element type in the tensor.

data

A Buffer that contains tensor data.

shape

A list of dimension sizes.

strides

A list of the number of bytes in each dimension.

dimension_names

A list of dimension names.

n_dimension_names

A list of dimension names

n_dimensions

The number of dimensions.

n_strides

The number of strides.

Returns:

The newly created Tensor.