What is the difference between call() and __call__() method in python?
call() is just a regular method that you can call on an instance of a class, e.g. foo.call(...).
__call__() is a special method that makes the instance itself callable. So instead of doing foo.call(...) you can just do foo(...). (You can also do foo.__call__() still.)
In the tensorflow documentation I see the call() method defined when subclassing activations and models. However, in case of subclassing regularizers, initializers and constraints, they define the __class__() method instead.
When playing around with both, I could not find any differences myself.
Could someone tell me what the difference is?