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

Function transpose

python/singa/autograd.py:2646–2656  ·  view source on GitHub ↗

Transpose the input tensor similar to numpy.transpose. Args: x (Tensor): Input tensor perm (list of ints): A list of integers. By default, reverse the dimensions, otherwise permute the axes according to the values given. Returns: Tensor, the output

(x, shape)

Source from the content-addressed store, hash-verified

2644
2645
2646def transpose(x, shape):
2647 """
2648 Transpose the input tensor similar to numpy.transpose.
2649 Args:
2650 x (Tensor): Input tensor
2651 perm (list of ints): A list of integers. By default, reverse the
2652 dimensions, otherwise permute the axes according to the values given.
2653 Returns:
2654 Tensor, the output
2655 """
2656 return Transpose(shape)(x)[0]
2657
2658
2659def add_all(*xs):

Callers

nothing calls this directly

Calls 1

TransposeClass · 0.70

Tested by

no test coverage detected