Fix inconsistent anchor boxes generation between train and inference
* Currently, `AnchorGenerator` and `Anchor` can actually generate different anchor boxes when input image size is not divisible by 2^max_level. This results in inconsistent training and inference box predictions. This change fix the inconsistency by calling only the Anchor class. * Fix the case when input image is not square. * Refactor the Anchor class to only generate and store `multilevel_boxes` since the flatten boxes are never used. PiperOrigin-RevId: 616997347
A
A. Unique TensorFlower committed
80bff162aeda364ee47450c30e4bc05ffc26f439
Parent: b41fc51