We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
easy
framework
Reshape a Tensor
Reshape a tensor to a given target shape without changing its data.
Input:
-
x: A tensor -
shape: A list of integers representing the target shape
Output: A tensor with the same data but reshaped to the target dimensions.
API Reference:
-
PyTorch:
x.reshape(shape)ortorch.reshape(x, shape) -
JAX:
jnp.reshape(x, shape)orx.reshape(shape)
Hints
reshape
tensor-manipulation
torch.reshape
jnp.reshape
Sign in to attempt this problem and view the solution.