打印时如何查看对象内部

时间:2019-06-05 17:07:57

标签: pytorch

这种情况在我身上发生了很多次,当我在pytorch中打印一个变量时,会看到如下结果:

 <bound method ConfusionMatrix.generateM of <utils.metric.ConfusionMatrix object at 0x7fd4ece9e850>> f

这是代码:

ConfM = ConfusionMatrix(class_num)
f = ConfM.generateM
print f, "f"

我怎么知道f到底是什么?

0 个答案:

没有答案