Boolean value of Tensor with more than one value is ambiguous

深度学习报错:Boolean value of Tensor with more than one value is ambiguous

网上看了很多方法都没用,后来发现错误很扯:
我的原报错代码为:

if condi_inputs:

这里的condi_inputs是一个矩阵,然后代码改为:

if condi_inputs is not None:

就没报错了。。。。真玄学?

你可能感兴趣的:(深度学习,python)