import torch import torch.nn as tnn from mt.load import * import torch.utils.data as td english, chinese = load_data() sen_c, (id2w_c, w2id_c) = split_c(chinese) sen_e, (id2w_e, w2id_e) = split_e(english) input_c, pad_c = word2id(sen_c, w2id_c) output_e, pad_e = word2id(sen_e, w2id_e) class MyDatase