class Field(RawField): File "/storage/st2/anaconda33/envs/python2/lib/python2.7/site-packages/t

   class Field(RawField):
  File "/storage/st2/anaconda33/envs/python2/lib/python2.7/site-packages/torchtext/data/field.py", line 118, in Field
    torch.float32: float,
AttributeError: 'module' object has no attribute 'float32'

torchtext 与pytorch的版本不对应

pytorch的版本低于0.4 应该使用torchtext的版本是0.2.3

pip install torchtext==0.2.3

 

你可能感兴趣的:(class Field(RawField): File "/storage/st2/anaconda33/envs/python2/lib/python2.7/site-packages/t)