有人能告诉我这里的错误吗?
import pytorch_translator as pt
import pickle
import torch
# Set up the dictionary (vocab table)
pairs, src, tgt = pt.genLangs("de", "en", "train-short.txt", vocab_size=6000)
with open("langs.pkl", 'wb') as outfile:
pickle.dump((src, tgt), outfile)
teacher_forcing_ratio = 0.5
hidden_size = 128
AttributeError Traceback(最近一次调用最后一次) in() 1#设置字典(词汇表) ----> 2对,src,tgt = pt.genLangs(“de”,“en”,“train-short.txt”,vocab_size = 6000) 3以open(“genLangs.pkl”,'wb')作为outfile: 4 pickle.dump((src,tgt),outfile) 5
AttributeError:'module'对象没有属性'genLangs'
genLangs有问题但是我在pytorch中找不到任何关于这个的东西,这表明这是错误的,但我不知道去那里是什么是正确的。完全删除它会产生语法错误。