Reshape a Tensor without modifying the underlying data. There is a method version of this static function: Tensor.reshape.
The resultant shape must contain the same number of elements as the base Tensor.
const t = sm.randn([64]) // equivalent calls const a = t.reshape([8, 8]) const b = sm.reshape(t, [8, 8])
Tensor to reshape
The shape of the output Tensor
Generated using TypeDoc
Reshape a Tensor without modifying the underlying data. There is a method version of this static function: Tensor.reshape.
Remarks
The resultant shape must contain the same number of elements as the base Tensor.
Example