We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
← Tensor Foundations step 7 of 7
Easy
Framework
Concatenate Tensors
Concatenate two 2D tensors along a specified axis.
Input:
-
a: A 2D tensor -
b: A 2D tensor -
axis: The axis along which to concatenate (0 for rows, 1 for columns)
Output: The concatenated tensor.
API Reference:
-
PyTorch:
torch.cat([a, b], dim=axis) -
JAX:
jnp.concatenate([a, b], axis=axis)
Nothing accepted yet. When a submission passes, the code that passed shows up
here, one entry per mode.
Stuck?
PyTorch reference solution
Sign in to attempt this problem and reveal the reference solution.