Same comment that to Laurent:
WeightDecay has a check to ignore NotImplementedError when the coef for that layer is 0.
You should have such a check too.