title: why implementing the "call" method when subclassing a tf.keras layer(or model) class makes the layer(model) object callable?
body: <p>When writing customized tf.keras layers, we have to implement the &quot;<code>call</code>&quot; method, since a object of a class can be called like a function with &quot;()&quot; only(?) if the object has a valid &quot;<code>__call__</code>&quot; method. while I didn't find something like</p>
  <pre><code>class tf.keras.model():
  def __call__(self, input):
      return self.call(input)
  </code></pre>
  <p>in the keras.model source, how could all this work?</p>