vdw:

I’m not sure about your reshape() in the return line either. If you’re not careful reshape() and view() can quickly mess up your data


I have found the issue: Do not use view() or reshape() to swap dimensions of tensors!
x = x.view(-1, x.size(0), self.input_size) # very bad idea, do not use it
x = x.permute(1,0,2) # fixes everething