amdegroot / ssd.pytorch

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

what does target actually look like in criterion(out, target)? #580

Open leejunu opened 2 years ago

leejunu commented 2 years ago

Hi, I've been working on a semi-supervised implementation and wanted to write pseudo-label code for this codebase. I thought the naive way of doing criterion(out, model(out)) would have sufficed, but it seems that the target are in some ground-truth format rather than the output of the model. Same issue happens if model has been built using the 'test' parameter in build_ssd as well, this time there is a shape mismatch. Can anyone shed some light on what targets looks like (from the dataloader)

AuroraRogers commented 1 year ago

Hi,i'm having the same issue here.

AuroraRogers commented 1 year ago

do you also have the error of "IndexError: The shape of the mask [16, 8732] at index 0 does not match the shape of the indexed tensor [139712, 1] at index 0"

makun-coder commented 7 months ago

Hello, have you solved it? I have the same problem