update to torchtext 0.9

This commit is contained in:
bentrevett 2021-03-12 13:25:47 +00:00
parent d925186eb4
commit 2b666b3cba
9 changed files with 25 additions and 26 deletions

View File

@ -53,7 +53,7 @@
"outputs": [],
"source": [
"import torch\n",
"from torchtext import data\n",
"from torchtext.legacy import data\n",
"\n",
"SEED = 1234\n",
"\n",
@ -80,7 +80,7 @@
"metadata": {},
"outputs": [],
"source": [
"from torchtext import datasets\n",
"from torchtext.legacy import datasets\n",
"\n",
"train_data, test_data = datasets.IMDB.splits(TEXT, LABEL)"
]
@ -823,4 +823,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}

View File

@ -49,8 +49,7 @@
],
"source": [
"import torch\n",
"from torchtext import data\n",
"from torchtext import datasets\n",
"from torchtext.legacy import data\n",
"\n",
"SEED = 1234\n",
"\n",
@ -86,7 +85,7 @@
}
],
"source": [
"from torchtext import datasets\n",
"from torchtext.legacy import datasets\n",
"\n",
"train_data, test_data = datasets.IMDB.splits(TEXT, LABEL)"
]
@ -884,4 +883,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}

View File

@ -89,8 +89,8 @@
],
"source": [
"import torch\n",
"from torchtext import data\n",
"from torchtext import datasets\n",
"from torchtext.legacy import data\n",
"from torchtext.legacy import datasets\n",
"\n",
"SEED = 1234\n",
"\n",
@ -737,4 +737,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}

View File

@ -52,8 +52,8 @@
],
"source": [
"import torch\n",
"from torchtext import data\n",
"from torchtext import datasets\n",
"from torchtext.legacy import data\n",
"from torchtext.legacy import datasets\n",
"import random\n",
"import numpy as np\n",
"\n",
@ -837,4 +837,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}

View File

@ -37,8 +37,8 @@
],
"source": [
"import torch\n",
"from torchtext import data\n",
"from torchtext import datasets\n",
"from torchtext.legacy import data\n",
"from torchtext.legacy import datasets\n",
"import random\n",
"\n",
"SEED = 1234\n",
@ -719,4 +719,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}

View File

@ -298,7 +298,7 @@
}
],
"source": [
"from torchtext import data\n",
"from torchtext.legacy import data\n",
"\n",
"TEXT = data.Field(batch_first = True,\n",
" use_vocab = False,\n",
@ -334,7 +334,7 @@
}
],
"source": [
"from torchtext import datasets\n",
"from torchtext.legacy import datasets\n",
"\n",
"train_data, test_data = datasets.IMDB.splits(TEXT, LABEL)\n",
"\n",
@ -1042,4 +1042,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}

View File

@ -53,8 +53,8 @@
"metadata": {},
"outputs": [],
"source": [
"from torchtext import data\n",
"from torchtext import datasets\n",
"from torchtext.legacy import data\n",
"from torchtext.legacy import datasets\n",
"\n",
"NAME = data.Field()\n",
"SAYING = data.Field()\n",
@ -449,4 +449,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}

View File

@ -911,4 +911,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}

View File

@ -56,7 +56,7 @@
"outputs": [],
"source": [
"import torch\n",
"from torchtext import data\n",
"from torchtext.legacy import data\n",
"\n",
"SEED = 1234\n",
"\n",
@ -80,7 +80,7 @@
"metadata": {},
"outputs": [],
"source": [
"from torchtext import datasets\n",
"from torchtext.legacy import datasets\n",
"import random\n",
"\n",
"train_data, test_data = datasets.IMDB.splits(TEXT, LABEL)\n",
@ -960,4 +960,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}