After consulting the tf.image,non_max_supression documentation and trying several variations of the “iou_threshold” argument in the tf.image.non_max_suppression() line (e.g. "iou_threshold’, “iou_threshold = iou_threshold,” “score_threshold = iou_threshold”, and others), i still keep getting the aforementioned error. Any guidance?
TypeError Traceback (most recent call last)
in
4 boxes = tf.random.normal([54, 4], mean=1, stddev=4, seed = 1)
5 classes = tf.random.normal([54,], mean=1, stddev=4, seed = 1)
----> 6 scores, boxes, classes = yolo_non_max_suppression(scores, boxes, classes)
7
8 assert type(scores) == EagerTensor, “Use tensoflow functions”
in yolo_non_max_suppression(scores, boxes, classes, max_boxes, iou_threshold)
27 # Use tf.image.non_max_suppression() to get the list of indices corresponding to boxes you keep
28 ##(≈ 1 line)
—> 29 nms_indices = tf.image.non_max_suppression(boxes, scores, classes, max_boxes_tensor, iou_threshold = 0.5)
30
31 # Use tf.gather() to select only nms_indices from scores, boxes and classes
/opt/conda/lib/python3.7/site-packages/tensorflow/python/util/dispatch.py in wrapper(*args, **kwargs)
199 “”“Call target, and fall back on dispatchers if there is a TypeError.”""
200 try:
→ 201 return target(*args, **kwargs)
202 except (TypeError, ValueError):
203 # Note: convert_to_eager_tensor currently raises a ValueError, not a
TypeError: non_max_suppression() got multiple values for argument ‘iou_threshold’