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