How could I fix this RunTimeError

Hi!
I write a LSTM program with pytorch and run on cpu .It works.
Then I run my program on GPU ,and a RunTimeError occured what the below show

Here are my computer environment:
pytorch 0.4.1
CUDA 9.2
GeForce GT 740M

What could I do ?Please help me, thank you!

Because I do not transform my rnn Module into cuda while I transform my data into cuda.
Now it works.