I am getting an error when I execute 4th exercise- yolo_eval function.
Error - “TypeError: Cannot convert 0.5 to EagerTensor of dtype int32”
I don’t know where I am wrong.
Thanks for help.
Here is the trace -
TypeError Traceback (most recent call last)
in
5 tf.random.normal([19, 19, 5, 1], mean=1, stddev=4, seed = 1),
6 tf.random.normal([19, 19, 5, 80], mean=1, stddev=4, seed = 1))
----> 7 scores, boxes, classes = yolo_eval(yolo_outputs)
8 print("scores[2] = " + str(scores[2].numpy()))
9 print("boxes[2] = " + str(boxes[2].numpy()))
in yolo_eval(yolo_outputs, image_shape, max_boxes, score_threshold, iou_threshold)
38 # Use one of the functions you’ve implemented to perform Non-max suppression with
39 # maximum number of boxes set to max_boxes and a threshold of iou_threshold (≈1 line)
—> 40 scores, boxes, classes = yolo_non_max_suppression(scores, boxes, max_boxes, iou_threshold)
41 ### END CODE HERE
42
in yolo_non_max_suppression(scores, boxes, classes, max_boxes, iou_threshold)
22 “”"
23
—> 24 max_boxes_tensor = tf.Variable(max_boxes, dtype=‘int32’) # tensor to be used in tf.image.non_max_suppression()
25
26 ### START CODE HERE