mirror of
https://github.com/labmlai/annotated_deep_learning_paper_implementations.git
synced 2025-08-14 01:13:00 +08:00
update torch
This commit is contained in:
@ -15,6 +15,7 @@ import torch
|
||||
import torchtext
|
||||
from torch import nn
|
||||
from torch.utils.data import DataLoader
|
||||
import torchtext.vocab
|
||||
from torchtext.vocab import Vocab
|
||||
|
||||
from labml import lab, tracker, monit
|
||||
@ -270,7 +271,7 @@ def ag_news(c: NLPClassificationConfigs):
|
||||
for (label, line) in valid:
|
||||
counter.update(tokenizer(line))
|
||||
# Create vocabulary
|
||||
vocab = Vocab(counter, min_freq=1)
|
||||
vocab = torchtext.vocab.vocab(counter, min_freq=1)
|
||||
|
||||
# Create training data loader
|
||||
train_loader = DataLoader(train, batch_size=c.batch_size, shuffle=True,
|
||||
|
@ -1,8 +1,9 @@
|
||||
torch>=1.7
|
||||
torch>=1.10
|
||||
torchvision>=0.11
|
||||
torchtext>=0.11
|
||||
labml>=0.4.133
|
||||
labml-helpers>=0.4.84
|
||||
torchvision
|
||||
numpy>=1.16.3
|
||||
numpy>=1.19
|
||||
matplotlib>=3.0.3
|
||||
einops>=0.3.0
|
||||
gym[atari]
|
||||
|
4
setup.py
4
setup.py
@ -5,7 +5,7 @@ with open("readme.md", "r") as f:
|
||||
|
||||
setuptools.setup(
|
||||
name='labml-nn',
|
||||
version='0.4.116',
|
||||
version='0.4.117',
|
||||
author="Varuna Jayasiri, Nipun Wijerathne",
|
||||
author_email="vpjayasiri@gmail.com, hnipun@gmail.com",
|
||||
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 @@ setuptools.setup(
|
||||
install_requires=['labml>=0.4.133',
|
||||
'labml-helpers>=0.4.84',
|
||||
'torch',
|
||||
'torchtext',
|
||||
'torchvision',
|
||||
'einops',
|
||||
'numpy'],
|
||||
classifiers=[
|
||||
|
Reference in New Issue
Block a user