Tensor

Tensor Tensor(IntArray shape, LongArray data)

data can be LongArray.

Tensor Tensor(IntArray shape, FloatArray data)

data can be FloatArray.

Tensor Tensor(IntArray shape, IntArray data)

data can be IntArray.

Tensor Tensor(IntArray shape, DoubleArray data)

makes a new tensor with a given shape and data. If data is not given, it will generate a zero tensor.

Parameters

shape

tensor shape.

data

must fit into the shape of this tensor.