BioroboticsLab / IBA

Information Bottlenecks for Attribution
MIT License
75 stars 9 forks source link

training readout does not work #19

Open jackklpan opened 4 years ago

jackklpan commented 4 years ago

Hi,

I meet two problems when training the readout network.

  1. https://github.com/BioroboticsLab/IBA/blob/34baed689b6a6f6e528a329d5386281dbba28dee/IBA/pytorch_readout.py#L128 does not work now, since https://github.com/BioroboticsLab/IBA/blob/34baed689b6a6f6e528a329d5386281dbba28dee/IBA/pytorch.py#L412 accepts one argument now. (Currently, I checkout to the previous commit)

  2. https://github.com/BioroboticsLab/IBA/blob/34baed689b6a6f6e528a329d5386281dbba28dee/IBA/pytorch_readout.py#L170 should be alpha = alpha.clamp(.... (The alpha become -infinite)

Could you check the current code can train the readout network? Thanks!

karl-schulz commented 4 years ago

Hi @jackklpan !

You are right, there were some issues I hope to have resolved with the latest pull request #21 . We will add a test for the readout IBA so this doesn't happen again.

Regarding the stability of the training, good spot! We also improved a minimal std in the normalization step to prevent divsion by very small numbers.

Please check if this solves your issues, we will do the same. We are happy to hear about your results.

Thanks for your contribution!

jackklpan commented 4 years ago

Thanks! I will try to train again.

voa18105 commented 4 years ago

Hello! Actually, there is a same issue with "per sample" - no alpha given