uzh-rpg / svit

Official implementation of "SViT: Revisiting Token Pruning for Object Detection and Instance Segmentation"
Apache License 2.0
23 stars 3 forks source link

Different strategies during training and inference #8

Open King4819 opened 3 months ago

King4819 commented 3 months ago

Seems that the code utilizes F.gumbel_softmax during training, but torch.argmin during inference

I want to ask that why using argmin instead of argmax ? I think the mask true should correspond to larger probability, so it should use argmax ?

Also, I have found that your code actually utilizes gumbel softmax at both training and inference stage, since "self.inference" argument is false at both training and inference stage.

Also, I discovered that when I modified to use argmin at inference stage, the performance will drastically drop.

Hope to get your response, thanks!