Pass variable to custom tanh function

Plus, after resolving this issue How to mark argument as nondifferentiable in a custom autograd Function, I am good :slight_smile:

thank you sir @ptrblck.