neulab / guided_summarization

GSum: A General Framework for Guided Neural Abstractive Summarization
MIT License
113 stars 27 forks source link

repeated warning during test #56

Open nargesdel opened 1 year ago

nargesdel commented 1 year ago

Hello,

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

guided_summarization/bart/fairseq/sequencegenerator.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/sequencegenerator.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.

zhuochunli commented 1 year ago

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