PyTorch: Difference between revisions
No edit summary |
|||
Line 10: | Line 10: | ||
==Usage== | ==Usage== | ||
==Memory Usage== | |||
Reducing memory usage | |||
* Save loss using [https://pytorch.org/docs/stable/tensors.html#torch.Tensor.item <code>.item()</code>] which returns a standard Python number |
Revision as of 15:46, 2 March 2020
PyTorch is a popular machine learning library developed by Facebook
Installation
# If using conda, python 3.5+, and CUDA 10.0 (+ compatible cudnn)
conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
Usage
Memory Usage
Reducing memory usage
- Save loss using
.item()
which returns a standard Python number