richardaecn / class-balanced-loss

Class-Balanced Loss Based on Effective Number of Samples. CVPR 2019
MIT License
597 stars 68 forks source link

Performance issues in tpu/models/official/retinanet/dataloader.py #20

Open DLPerf opened 2 years ago

DLPerf commented 2 years ago

Hello,I found a performance issue in the definition of __call__ , tpu/models/official/retinanet/dataloader.py, dataset = dataset.map(_process_example) was called without num_parallel_calls. I think it will increase the efficiency of your program if you add this.

The same issues also exist in dataset = dataset.map(parser) , dataset = dataset.repeat().map(parser)

Here is the documemtation of tensorflow to support this thing.

Looking forward to your reply. Btw, I am very glad to create a PR to fix it if you are too busy.