I have the same err!
try:
    lstmout = out.view(-1,lstmoutsize)
except Exception as e:
    print(e)
I run the code up in another file, it’s OK, Only error occured in my Lstm Implement module, I don’t know why!!