The values of the tensor. Can be nested array of numbers,
or a flat array, or a TypedArray
.
Optional
shape: [number, number]The shape of the tensor. If not provided, it is inferred from
values
.
Optional
dtype: keyof DataTypeMapThe data type.
Generated using TypeDoc
Creates rank-2
tf.Tensor
with the provided values, shape and dtype.The same functionality can be achieved with
tf.tensor
, but in general we recommend usingtf.tensor2d
as it makes the code more readable.