The fact that such a function shows up is a strong indication that we are doing something incorrect somewhere else; I'd rather find the original error than use stop-gap measures like this.
This hack introduces non-differentiability and potentially vanishing gradients into the energy, which give the minimizers a hard time; strictly speaking, this breaks function properties required by our minimizers.
It also destroys the identity log(exp(a))==a.
I have a really bad feeling about this ...
The fact that such a function shows up is a strong indication that we are doing something incorrect somewhere else; I'd rather find the original error than use stop-gap measures like this.
This hack introduces non-differentiability and potentially vanishing gradients into the energy, which give the minimizers a hard time; strictly speaking, this breaks function properties required by our minimizers.
It also destroys the identity `log(exp(a))==a`.