HLTCHKUST / PAML

Personalizing Dialogue Agents via Meta-Learning
MIT License
126 stars 24 forks source link

expected dtype Byte but got dtype Bool #19

Open mengyunyun0824 opened 2 years ago

mengyunyun0824 commented 2 years ago

Hi! An error occurs when I run MAML.py. Can you give me some advice? Thanks a lot!

Issue summary Traceback (most recent call last): File "MAML.py", line 149, in v_loss, v_ppl = do_evaluation(meta_net, val_iter) File "MAML.py", line 99, in doevaluation loss, ppl, = model.train_one_batch(batch, train=False) File "C:\Users\lenovo\Desktop\PAML\PAML\model\transformer.py", line 329, in train_one_batch pre_logit, attn_dist = self.decoder(self.embedding(dec_batch_shift),encoder_outputs, (mask_src,mask_trg)) File "C:\Users\lenovo\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 547, in call result = self.forward(*input, **kwargs) File "C:\Users\lenovo\Desktop\PAML\PAML\model\transformer.py", line 177, in forward dec_mask = torch.gt(mask_trg + self.mask[:, :mask_trg.size(-1), :mask_trg.size(-1)], 0)

RuntimeError: expected device cuda:0 and dtype Byte but got device cuda:0 and dtype Bool

mengyunyun0824 commented 2 years ago

Is it because I am using torch==1.2.0 ?