我想使用 tensorflow tf.image.non_max_suppression 函数。
我尝试了以下两个片段:
indices = tf.image.non_max_suppression(
boxes=anchors_fit,
scores=rpn_cls_prob,
max_output_size=self.max_outputs_num,
)
indices,scores = tf.image.non_max_suppression_with_scores(
boxes=anchors_fit,
scores=rpn_cls_prob,
max_output_size=self.max_outputs_num,
)
在哪里
和anchors_fit.shape
是[36864,4]
rpn_cls_prob.shape
[36864]
两个电话都加注:
ValueError: Shape must be rank 0 but is rank 1 for 'non_max_suppression_with_scores/NonMaxSuppressionV5' (op: 'NonMaxSuppressionV5') with input shapes: [36864,4], [36864], [1], [], [], [].
我应该怎么办?