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