ValueError:only one element tensors can be converted to Python scalars解决办法
有时候我们在使用pytorch将一个list转换成为tensor的时候可能会遇到这个问题:
报错内容:
ValueError:only one element tensors can be converted to Python scalars
或者:
TypeError: only integer tensors of a single element can be converted to a

