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

Function reshape

examples/model_selection/Trails/singa_pkg_code/tensor.py:803–815  ·  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

801
802
803def 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 ''&#x27;
815 return _call_singa_func(singa.Reshape, tensor.data, shape)
816
817
818def transpose(t, axes=None):

Callers 1

tensordotFunction · 0.70

Calls 1

_call_singa_funcFunction · 0.70

Tested by

no test coverage detected