We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
easy
framework
Transpose a Matrix
Transpose a 2D matrix (swap rows and columns).
Input: A 2D tensor x of shape (m, n)
Output: A 2D tensor of shape (n, m) that is the transpose of x.
API Reference:
-
PyTorch:
x.T,x.t(), ortorch.transpose(x, 0, 1) -
JAX:
x.Torjnp.transpose(x)
Hints
transpose
linear-algebra
torch.transpose
jnp.transpose
Sign in to attempt this problem and view the solution.