PyTorch: Difference between revisions

 
(One intermediate revision by the same user not shown)
Line 2: Line 2:


==Installation==
==Installation==
See [https://pytorch.org/get-started/locally/ PyTorch Getting Started]
See [https://pytorch.org/get-started/locally/ PyTorch Getting Started] and [https://pytorch.org/get-started/previous-versions/ PyTorch Previous Versions]
<syntaxhighlight lang="bash">


# If using conda, python 3.5+, and CUDA 10.0 (+ compatible cudnn)
I recommend using the conda installation method since it is paired with the correct version of cuda.
conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
</syntaxhighlight>


==Getting Started==
==Getting Started==
Line 45: Line 42:


==Usage==
==Usage==
Note that there are some useful functions under <code>torch.nn.functional</code> which is typically imported as <code>F</code>.
Note that there are several useful functions under <code>torch.nn.functional</code> which is typically imported as <code>F</code>.
Most neural network layers are actually implemented in functional.


===torch.meshgrid===
===torch.meshgrid===