PIPNet icon indicating copy to clipboard operation
PIPNet copied to clipboard

Possible Major Bug

Open zimmermax98 opened this issue 2 years ago • 1 comments

Hi Meike,

after working with your code, I might have found a critical bug during training/testing.

As far as I understood, the classification weights close to 0 should be clamped to be at least 1e-3. This is done in main.py:236, train.py:91 and test.py:49.

The problem here is, that even if weights are bigger than 1e-3, they will get reduced by 1e-3. Since this is done in the loops over the train/test loaders, the weights will be reduced many times, obviously leading to wrong classification results.

I especially noticed the effects in the test.py as my accuracy dropped dramatically. I'm currently extending PIPNet to segmentation, and my mIoUs dropped to near chance. I haven't looked into the effects for your default PIPNet configuration for classification.

Hope this helps!

Best Max

zimmermax98 avatar Sep 01 '23 08:09 zimmermax98

@zimmermax98 your point is quite valid, but you can easily handle it with changing your clamping threshold which depends on your dataset!

marziehoghbaie avatar Jul 26 '24 13:07 marziehoghbaie