agnews_train, agnews_test = torchtext.datasets.text_classification.DATASETS["AG_NEWS"](root="./datasets")
在运行到上述行之后,我得到了属性错误
AttributeError Traceback (most recent call last) in ----> 1 agnews_train, agnews_test = torchtext.datasets.text_classification.DATASETS"AG_NEWS"
AttributeError:模块“torchtext.dataset”没有属性“text\u classification”
您可能只是使用了不同的版本。你想要的是:
Documentation
相关问题 更多 >
编程相关推荐