Open c4big opened 1 year ago
\code_practices\Sequence_to_Sequence_with_Attention_Tutorial.ipynb \code_practices\Sequence_to_Sequence_with_LSTM_Tutorial.ipynb
from torchtext.data import Field, BucketIterator # An error occured!!
ImportError Traceback (most recent call last) in <cell line: 1>() ----> 1 from torchtext.data import Field, BucketIterator 2 3 SRC = Field(tokenize=tokenize_de, init_token="", eos_token="", lower=True) 4 TRG = Field(tokenize=tokenize_en, init_token="", eos_token="", lower=True)
ImportError: cannot import name 'Field' from 'torchtext.data' (/usr/local/lib/python3.10/dist-packages/torchtext/data/init.py)
NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the "Open Examples" button below.
\code_practices\Sequence_to_Sequence_with_Attention_Tutorial.ipynb \code_practices\Sequence_to_Sequence_with_LSTM_Tutorial.ipynb
from torchtext.data import Field, BucketIterator # An error occured!!
ImportError Traceback (most recent call last) in <cell line: 1>()
----> 1 from torchtext.data import Field, BucketIterator
2
3 SRC = Field(tokenize=tokenize_de, init_token="", eos_token="", lower=True)
4 TRG = Field(tokenize=tokenize_en, init_token="", eos_token="", lower=True)
ImportError: cannot import name 'Field' from 'torchtext.data' (/usr/local/lib/python3.10/dist-packages/torchtext/data/init.py)
NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the "Open Examples" button below.