kimiyoung / transformer-xl

Apache License 2.0
3.61k stars 763 forks source link

Pytorch questions! #115

Open garysun1994 opened 4 years ago

garysun1994 commented 4 years ago

I use torch=1.4.0, and python=3.6.4 running sh on only one GPU (the corporation condition is poor) -.- it indicates /pytorch/aten/src/ATen/native/cuda/LegacyDefinitions.cpp:19: UserWarning: maskedfill received a mask with dtype torch.uint8, this behavior is now deprecated,please use a mask with dtype torch.bool instead.

how can i solve this error?

smallt-TAO commented 4 years ago

` else:

transform byte to bool type.

        dec_attn_mask = torch.triu(
            word_emb.new_ones(qlen, klen), diagonal=1+mlen).bool()[:,:,None]

` byte() -> bool()