Open karray opened 1 month ago
Hey @karray,
thanks a lot for spotting this, and for the PR. I guess the issue is that we modify the bias, but it remains unused by the module unless it is explicitly registered as a Parameter
. As we are using a Canonizer, I think just adding the Parameter is the right call. I will leave you a small comment on the PR.
Description
The c30e3cc4586b43a0cff37e8e74e63cfb9324c710 commit breaks saliency map generation. The behavior of
object.__setattr__
for setting thebias
parameter in canonizers.MergeBatchNorm differs from using direct assignment orsetattr()
(object.__setattr__
bypasses customnn.Module.__setattr__
). Since thebias
isNone
, this will lead to inconsistencies in parameter registration.Reproducible Example