I have a problem with the first function in Week3 assignment. I always get an error and I have no idea what I did wrong. The error is copied below. Can anyone help please, thanks!
TypeError Traceback (most recent call last)
in
3 boxes = tf.random.normal([19, 19, 5, 4], mean=1, stddev=4, seed = 1)
4 box_class_probs = tf.random.normal([19, 19, 5, 80], mean=1, stddev=4, seed = 1)
----> 5 scores, boxes, classes = yolo_filter_boxes(boxes, box_confidence, box_class_probs, threshold = 0.5)
6 print("scores[2] = " + str(scores[2].numpy()))
7 print("boxes[2] = " + str(boxes[2].numpy()))
in yolo_filter_boxes(boxes, box_confidence, box_class_probs, threshold)
33 # Step 3: Create a filtering mask based on ābox_class_scoresā by using āthresholdā. The mask should have the
34 # same dimension as box_class_scores, and be True for the boxes you want to keep (with probability >= threshold) (ā 1 line)
ā> 35 filtering_mask = tf.math.greater_equal(box_class_scores,threshold)
36
37 # Step 4: Apply the mask to box_class_scores, boxes and box_classes (ā 3 lines)
/opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/gen_math_ops.py in greater_equal(x, y, name)
4053 _result = pywrap_tfe.TFE_Py_FastPathExecute(
4054 _ctx._context_handle, tld.device_name, āGreaterEqualā, name,
ā 4055 tld.op_callbacks, x, y)
4056 return _result
4057 except _core._NotOkStatusException as e:
TypeError: Cannot convert 0.5 to EagerTensor of dtype int64