Hi, I am getting the following error in this. Could anyone please help in this.
InvalidArgumentError Traceback (most recent call last)
in
4 boxes = tf.random.normal([19, 19, 5, 4], mean=1, stddev=4, seed = 1)
5 box_class_probs = tf.random.normal([19, 19, 5, 80], mean=1, stddev=4, seed = 1)
----> 6 scores, boxes, classes = yolo_filter_boxes(boxes, box_confidence, box_class_probs, threshold = 0.5)
7
8
in yolo_filter_boxes(boxes, box_confidence, box_class_probs, threshold)
31 # Step 2: Find the box_classes using the max box_scores, keep track of the corresponding score
32 ##(β 2 lines)
β> 33 box_classes = tf.math.argmax( box_scores, axis=box_scores.shape[-1])
34 box_class_scores = tf.math.reduce_max(box_scores,axis=box_scores.shape[-1], keepdims=False )
35
/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
/opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/math_ops.py in argmax_v2(input, axis, output_type, name)
293 if axis is None:
294 axis = 0
β 295 return gen_math_ops.arg_max(input, axis, name=name, output_type=output_type)
296
297
/opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/gen_math_ops.py in arg_max(input, dimension, output_type, name)
851 return _result
852 except _core._NotOkStatusException as e:
β 853 _ops.raise_from_not_ok_status(e, name)
854 except _core._FallbackException:
855 pass
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/ops.py in raise_from_not_ok_status(e, name)
6841 message = e.message + (" name: " + name if name is not None else ββ)
6842 # pylint: disable=protected-access
β 6843 six.raise_from(core._status_to_exception(e.code, message), None)
6844 # pylint: enable=protected-access
6845
/opt/conda/lib/python3.7/site-packages/six.py in raise_from(value, from_value)
InvalidArgumentError: Expected dimension in the range [-4, 4), but got 80 [Op:ArgMax]