Dot Product
Return the dot product of the 1-D tensors a and b: multiply the elements at the same positions, and add up the products.
Example 1
a [1.0,2.0,3.0]
b [4.0,5.0,6.0]
returns 32.0
Constraints
aandbhave the same length, 1 to 8
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More PyTorch problems
- HalvesBeginner
- The Last ColumnBeginner
- The ShapeBeginner
- Twice Plus OneBeginner
- Two RowsBeginner
- A Layer by HandEasy
- Center the ColumnsEasy
- Daily ReturnsEasy