Error: Bool value of Tensor with more than one value is ambiguous
程序员文章站
2022-03-03 14:41:24
...
在Where-are-they-looking-PyTorch中的utils.py中有一个判断
if temp < best:
best = temp
报出
Error: Bool value of Tensor with more than one value is ambiguous
解决方法
把getdata.py中的predict函数含返回值改成
return hm_base.view(-1, 227 * 227)
即可
推荐阅读
-
moviepy AudioClip帧处理ValueError: The truth value of array with more than one element is ambiguous
-
python报错ValueError: The truth value of an array with more than one element is ambiguous. Use a.any()
-
Python报错:The truth value of an array with more than one element is ambiguous
-
Python ValueError: The truth value of an array with more than one element is ambiguous.
-
成功解决Python的ValueError: The truth value of an array with more than one element is ambiguous
-
moviepy AudioClip帧处理ValueError: The truth value of array with more than one element is ambiguous
-
RuntimeError: bool value of Tensor with more than one value is ambiguous
-
Bool value of Tensor with more than one value is ambiguous
-
[numpy问题]The truth value of an array with more than one element is ambiguous.
-
学习随笔-ValueError: The truth value of an array with more than one element is ambiguous