We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
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)
Hints
concatenate
torch.cat
jnp.concatenate
Sign in to attempt this problem and view the solution.