You don’t need to bind the whole class in python. Just the apply function will work. And if you can’t bind CPTanh::apply you can create a local function that then calls it.
Just like the python version, you should never call forward and backward yourself nor instantiate the class. Only the static method apply is needed.