[Week 3] As 1 - yolo_filter_boxes() Why do we flatten the output?

Why do we flatten the output in this function instead of keeping the dimensions (19, 19, 5)? (for example by using the function " tf.ragged.boolean_mask", instead of tf.boolean_mask)

It becomes then hard to follow what we do in yolo_non_max_suppression()

Is there a reason to it?

Hello Garrofederico,
Hope all is well with you.

This is indeed a great idea. But as you know, the whole process is iterative, and through iterations, we found out that flattening the data works well. And this is the goal, having something that works well.
Why don’t you try to implement your suggestion and get back to me with the result?



Seems like ‘works better’ is the only reason to take an extra step in the code, not merely ‘works well’. So what about the flattened data structure works better? More accurate results? Lessens memory requirement? Faster downstream processing? Thanks