1. 报错如下:
发生异常: TypeError
rsub() received an invalid combination of arguments - got (Tensor, numpy.ndarray), but expected one of:
* (Tensor input, Tensor other, *, Number alpha)
* (Tensor input, Number other, Number alpha)
2. 解决如下
https://blog.csdn.net/m0_46527503/article/details/114549630
我的:在于numpy的array和pytorch的tensor,两种类型不一致,不可以直接运算。