I am sorry that I didnt understand your answer.Do you mean that, after I use dataparallel to my model,I shouldnt use something like to.(device) inside the model?
Here is my error and code.I would appreciate it if you can have a look at it!

屏幕快照 2019-04-10 下午6.08.46.png2672×964 408 KB


屏幕快照 2019-04-10 下午6.09.54.png1928×688 124 KB