The Last Column
Return the last column of the 2-D tensor x, as a 1-D tensor.
Example 1
x [[1.0,2.0,3.0],[4.0,5.0,6.0]]
returns [3.0,6.0]
Constraints
- 1 to 5 rows, 1 to 5 columns
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More PyTorch problems
- The ShapeBeginner
- Twice Plus OneBeginner
- Two RowsBeginner
- A Layer by HandEasy
- Center the ColumnsEasy
- Daily ReturnsEasy
- End to EndEasy
- Floor at ZeroEasy