November 2018
Beginner to intermediate
182 pages
4h 48m
English
You can install the latest version of Pytorch (website) via conda or pip for your target machine. I am running this code on a Windows laptop with a GPU.
I have installed torch using conda install pytorch cuda92 -c pytorch.
For installing torchtext, I recommend using pip directly from their GitHub repository with the latest fixes instead of PyPi, which is not frequently updated. Uncomment the line when running this notebook for the first time:
# !pip install --upgrade git+https://github.com/pytorch/textLet's set up the imports for torch, torch.nn (which is used in modeling), and torchtext:
import torch import torch.nn as nn import torch.nn.functional as F import torchtext
If you are running this code on a ...
Read now
Unlock full access