fabrahman / Emo-Aware-Storytelling

Code repository for our EMNLP 2020 long paper "Modeling Protagonist Emotions for Emotion-Aware Storytelling" (https://arxiv.org/abs/2010.06822)
MIT License
19 stars 6 forks source link

The project is wrong when the generated sentences of beam_story is larger in dev epoch #7

Closed xinli2008 closed 3 years ago

xinli2008 commented 3 years ago

Hello, @fabrahman ~ when i run run_emorl.sh with comet reward ,in the dev epoch, something happened.Here is the detail of the error. When the length of sentences in beamstory is larger,such as this: beam story [['Tammy was walking in the woods.', 'She saw a snake.', 'She was scared.', 'She ran away.', 'She was afraid to go back.'], ['I was painting the garage door.', 'I was painting the door when I noticed a crack.', 'I went to the garage and look ed at the door.', 'I saw that the crack was caused by a nail.', 'I went to the store and bought a new nail.'], ['I went to the doctor for a routine checkup.', 'The doctor told me I needed to get an x-ray.', "I went to the doctor's office.", 'The doctor told me I needed to get an MRI.', **'I was scared to go to the MRI because I was afraid I would get an x-ray.'_], ['I was at the park with my friends.', 'We were playing catch with a ball.', 'I was trying to catch the ball.', 'I was trying to catch it but it was too far away.', 'I ended up just throwing the ball to my friends.']]; When the input event is I was scared to go to the MRI because I was afraid I would get an x-ray** the project will go wrong ,the error of information is : RuntimeError: The expanded size of the tensor (18) must match the existing size (19) at non-singleton dimension 1. Target siz es: [1, 18]. Tensor sizes: [19] Have you ever encountered this problem? Do you have a solution?I really need your help , i will appreciate it! @fabrahman