Method ShallowReshape
ShallowReshape(TensorShape)
Returns a shallow copy of the Tensor with a new shape. The copy shares data storage with the original tensor.
newShape.length must be equal to this.shape.length.
Declaration
public override Tensor ShallowReshape(TensorShape newShape)
Parameters
| Type | Name | Description |
|---|---|---|
| TensorShape | newShape | The shape of the returned tensor. |
Returns
| Type | Description |
|---|---|
| Tensor | The tensor with the new shape sharing the same data storage as the original tensor. |