MCPcopy Create free account
hub / github.com/apache/singa / reshape

Function reshape

python/singa/tensor.py:834–846  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

832
833
834def reshape(tensor, shape):
835 '''Reshape the input tensor with the given shape and
836 the original tensor is not changed
837
838 Args:
839 tensor (Tensor): the tensor to be changed
840 shape (list<int>): the new shape, which should have the same volumn as the
841 old shape.
842
843 Returns:
844 the new Tensor
845 ''&#x27;
846 return _call_singa_func(singa.Reshape, tensor.data, shape)
847
848
849def transpose(t, axes=None):

Callers 1

tensordotFunction · 0.70

Calls 1

_call_singa_funcFunction · 0.70

Tested by

no test coverage detected