1. Torchtext installation version corresponding
torch version: 1.xy
torchtext version: 1.x+1,y
2. Solve the problem of AttributeError: module 'torchtext.data' has no attribute 'Field'
After torchtext=0.9.0 version, all data will be moved under "legacy", so add "legacy" before data
# 修改前
torchtext.data.Field()
# 修改后
torchtext.legacy.data.Field()