The code works fine while using the data you provided , but when I use my own data for training, "RuntimeRrror: sizes must be non-negative".
My data generation follows the instruction from https://github.com/abisee/cnn-dailymail, which is also adopted by pointer-sum (https://github.com/atulkum/pointer_summarizer)
So, if it is convenient, can you provide the code to generate the training data?