Stack the Rows
a and b are 1-D tensors of the same length. Return a 2-D tensor with a as its first row and b as its second.
Example 1
a [1.0,2.0]
b [3.0,4.0]
returns [[1.0,2.0],[3.0,4.0]]
Constraints
- 1 to 6 elements each
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More PyTorch problems
- The First GradientEasy
- The k LargestEasy
- A Moving AverageMedium
- Count the ParametersMedium
- Cross-EntropyMedium
- Fit a LineMedium
- How Often RightMedium
- In BatchesMedium