amdegroot / ssd.pytorch

A PyTorch Implementation of Single Shot MultiBox Detector
MIT License
5.12k stars 1.74k forks source link

Extract loss for each image in the batch #599

Open zuliani99 opened 5 months ago

zuliani99 commented 5 months ago

I'm wondering if it is possible to extract the class confidence and location box loss for each image in the batch, so not having a unique loss metric at the end but a tensor of loss in the such form [batch_size, 2] with each column corresponding to the class confidence and location box loss?

I'm asking this since I'm willing to add an additional module up on SSD and I need the loss for each images in the batch.