Skip to content

Commit 6cd0ed1

Browse files
committed
update torch
1 parent 3a6f8e9 commit 6cd0ed1

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

โ€Žlabml_nn/experiments/nlp_classification.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import torchtext
1616
from torch import nn
1717
from torch.utils.data import DataLoader
18+
import torchtext.vocab
1819
from torchtext.vocab import Vocab
1920

2021
from labml import lab, tracker, monit
@@ -270,7 +271,7 @@ def ag_news(c: NLPClassificationConfigs):
270271
for (label, line) in valid:
271272
counter.update(tokenizer(line))
272273
# Create vocabulary
273-
vocab = Vocab(counter, min_freq=1)
274+
vocab = torchtext.vocab.vocab(counter, min_freq=1)
274275

275276
# Create training data loader
276277
train_loader = DataLoader(train, batch_size=c.batch_size, shuffle=True,

โ€Žrequirements.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
torch>=1.7
1+
torch>=1.10
2+
torchvision>=0.11
3+
torchtext>=0.11
24
labml>=0.4.133
35
labml-helpers>=0.4.84
4-
torchvision
5-
numpy>=1.16.3
6+
numpy>=1.19
67
matplotlib>=3.0.3
78
einops>=0.3.0
89
gym[atari]

โ€Žsetup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name='labml-nn',
8-
version='0.4.116',
8+
version='0.4.117',
99
author="Varuna Jayasiri, Nipun Wijerathne",
1010
author_email="vpjayasiri@gmail.com, hnipun@gmail.com",
1111
description="๐Ÿง‘โ€๐Ÿซ Implementations/tutorials of deep learning papers with side-by-side notes ๐Ÿ“; including transformers (original, xl, switch, feedback, vit), optimizers (adam, radam, adabelief), gans(dcgan, cyclegan, stylegan2), ๐ŸŽฎ reinforcement learning (ppo, dqn), capsnet, distillation, etc. ๐Ÿง ",
@@ -23,6 +23,8 @@
2323
install_requires=['labml>=0.4.133',
2424
'labml-helpers>=0.4.84',
2525
'torch',
26+
'torchtext',
27+
'torchvision',
2628
'einops',
2729
'numpy'],
2830
classifiers=[

0 commit comments

Comments
ย (0)