Issue
I'm trying to do this from torchtext.data import TabularDataset, Field, LabelField, BucketIterator
, however, I get the following exception:
ImportError: cannot import name 'TabularDataset' from 'torchtext.data' (D:\Users\shuvo\miniconda3\envs\vi38\lib\site-packages\torchtext\data_init_.py)
But I see it in the documentation (figure below). Is there any other way to import it?
Solution
torchtext.data
and its contents have been obsolete for a big while now (readthedocs are grossly outdated). For a time being, it's been available as torchtext.legacy.data
, but it has been removed entirely in the recent versions as far as I know, in a favour of modern torchdata routines, such as torchdata.datapipes.iter.CSVParser
.
Answered By - dx2-66
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.