Reshape the input tensor with the given shape and the original tensor is not changed Args: tensor (Tensor): the tensor to be changed shape (list ): the new shape, which should have the same volumn as the old shape. Returns: the new Tensor
(tensor, shape)
| 801 | |
| 802 | |
| 803 | def reshape(tensor, shape): |
| 804 | '''Reshape the input tensor with the given shape and |
| 805 | the original tensor is not changed |
| 806 | |
| 807 | Args: |
| 808 | tensor (Tensor): the tensor to be changed |
| 809 | shape (list<int>): the new shape, which should have the same volumn as the |
| 810 | old shape. |
| 811 | |
| 812 | Returns: |
| 813 | the new Tensor |
| 814 | ''' |
| 815 | return _call_singa_func(singa.Reshape, tensor.data, shape) |
| 816 | |
| 817 | |
| 818 | def transpose(t, axes=None): |
no test coverage detected