RuntimeError: Expected a 'cuda' device type for generator but found 'cpu' 使用的1.9版本的pytorch太高了,换成pytorch1.8之后就行了。