Python ValueError: The truth value of an array with more than one element is ambiguous.
程序员文章站
2022-05-27 12:49:40
...
- 问题代码
predict_scores = predictions["scores"].to("cpu").numpy()
for i in len(predictions["scores"]):
原因:具有多个元素的数组的真值是不明确的
- 解决方案
for i in range(len(predictions["scores"]))
推荐阅读
-
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
-
[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
-
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or
-
moviepy AudioClip帧处理ValueError: The truth value of array with more than one element is ambiguous