guided_summarization icon indicating copy to clipboard operation
guided_summarization copied to clipboard

repeated warning during test

Open nargesdel opened this issue 2 years ago • 1 comments

Hello,

While testing the model and running z_tes.sh, I got this repeated error messages:

guided_summarization/bart/fairseq/sequence_generator.py:1146: UserWarning: An output with one or more elements was resized since it had shape [7], which does not match the required output shape [9].This behavior is deprecated, and in a future PyTorch release outputs will not be resized unless they have zero elements. You can explicitly reuse an out tensor t by resizing it, inplace, to zero elements with t.resize_(0). (Triggered internally at /pytorch/aten/src/ATen/native/Resize.cpp:19.) out=eos_bbsz_idx, guided_summarization/bart/fairseq/sequence_generator.py:1154: UserWarning: An output with one or more elements was resized since it had shape [7], which does not match the required output shape [9].This behavior is deprecated, and in a future PyTorch release outputs will not be resized unless they have zero elements. You can explicitly reuse an out tensor t by resizing it, inplace, to zero elements with t.resize_(0). (Triggered internally at /pytorch/aten/src/ATen/native/Resize.cpp:19.) out=eos_scores,

Does this warning affect the result of output? Also, I am wondering if there will be any clue of this to resolve this warning.

Thanks.

nargesdel avatar Jan 31 '23 21:01 nargesdel

Yes, I encountered the same problem, but I don't know how to eliminate these warnings.

zhuochunli avatar Feb 11 '23 00:02 zhuochunli