Python报错 TypeError: 'int' object is not callable
Python报错 TypeError: ‘int’ object is not callable
代码如下:
因为预测的输出类型为numpy,但是criterion对象参数为torch类型。
修改代码:
传入参数类型改为torch类型,不再报错。
Python报错 TypeError: ‘int’ object is not callable
代码如下:
因为预测的输出类型为numpy,但是criterion对象参数为torch类型。
修改代码:
传入参数类型改为torch类型,不再报错。