Solved by albanD in post #2 
              
              
                Hi, 
The problem is that your model is created in type float by default. So if you need it to be of a different type, you need to change it with: model.double(). after you created it. 
Another thing, you cannot use .view() directly on the output of the lstm (because of the way the lstm returns its o…