Skip to content

TypeError: __init__() got an unexpected keyword argument 'tensor_type' #8

@hsluoyz

Description

@hsluoyz

Running the main.py got the error:

C:\Python36\python.exe I:/github_repos/Text-Classification-Pytorch/main.py
Traceback (most recent call last):
  File "I:/github_repos/Text-Classification-Pytorch/main.py", line 11, in <module>
    TEXT, vocab_size, word_embeddings, train_iter, valid_iter, test_iter = load_data.load_dataset()
  File "I:\github_repos\Text-Classification-Pytorch\load_data.py", line 31, in load_dataset
    LABEL = data.LabelField(tensor_type=torch.FloatTensor)
  File "C:\Python36\lib\site-packages\torchtext\data\field.py", line 699, in __init__
    super(LabelField, self).__init__(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'tensor_type'

Process finished with exit code 1

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