发生异常: TypeError rsub() received an invalid combination of arguments - got (Tensor, numpy.ndarray), but expected one of问题分析
时间:2021-03-30 00:30:13
收藏:0
阅读:296
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,两种类型不一致,不可以直接运算。
原文:https://www.cnblogs.com/vvzhang/p/14594417.html
评论(0)