Skip to content

Commit

Permalink
Update pytorch.md
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipMay authored Sep 19, 2024
1 parent 75375b4 commit d707dac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/machine-learning/pytorch.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

- [torch.Tensor.item()](https://pytorch.org/docs/stable/generated/torch.Tensor.item.html)
- convert tensor to standard Python number
- only works for tensors with one element
- only works for tensors with one element - otherwise an exception is raised
- implicitly moves the value to the CPU

0 comments on commit d707dac

Please sign in to comment.