Skip to content

AttributeError: module 'torchtext.data' has no attribute 'Iterator' #29

Description

@foreseez

Traceback (most recent call last): File "train.py", line 5, in <module> from Process import * File "/Users/pycharm_pro/PyTorch_Learning/Transformer/Process.py", line 5, in <module> from Batch import MyIterator, batch_size_fn File "/Users/pycharm_pro/PyTorch_Learning/Transformer/Batch.py", line 35, in <module> class MyIterator(data.Iterator): AttributeError: module 'torchtext.data' has no attribute 'Iterator'

    • torch 1.8.0
  • torch-cluster 1.5.4
  • torch-geometric 1.5.0
  • torch-scatter 2.0.4
  • torch-sparse 0.6.1
  • torch-spline-conv 1.2.0
  • torchtext 0.9.0

https://pytorch.org/text/stable/data_functional.html

image

i guess whether the torchtext.data's api has changed ,but i don't find right api

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions