I've been trying to get the Yolo v3 to work in TF 2.x for the last few weeks, and every time I fix one problem, another one shows up. The main challenge was with actually making TensorFlow do the NonMaxSuppression for each scale, and sample in the training set. I used tf.image.non_max_suppression_padded, and I was hit by
Tensorflow.python.framework.errors_impl.OperatorNotAllowedInGraphError: using a `tf.Tensor` as a Python `bool` is not allowed in Graph execution. Use Eager execution or decorate this function with @tf.function.
I fixed this by disabling the eager execution, and moved till Model(input, output)
, but this time I am hit by
tensorflow.python.framework.errors_impl.InternalError: Tensorflow type 21 not convertible to numpy dtype
I tried stacking the TensorArray (yes, TensorArray because I had to loop over each scale and sample in the batch), converting to Tensor, but nothing worked.
Tips on how I can fix this?