I am working on a summarization project.
My model has the encoder-decoder structure when the decoder generates the sentence, sometimes it will
give out an index of the predicted word which is out of the size of word2id dict.
This is the error I came across.

409757693.jpeg450×800 63.3 KB
 
152927838.jpeg1080×1920 836 KB