parameters: (self)
return_statement: return self
docstring: Returns the Callback Model for this Model.
docstring_summary: Returns the Callback Model for this Model.
docstring_tokens: Returns the Callback Model for this Model .
function: def _get_callback_model(self):
      """Returns the Callback Model for this Model."""
  
      if hasattr(self, '_replicated_model') and self._replicated_model:
        # When using training_distributed, we set the callback model
        # to an instance of the `DistributedModel` that we create in
        # the `compile` call. The `DistributedModel` is initialized
        # with the first replicated model. We need to set the callback
        # model to a DistributedModel to allow us to override saving
        # and loading weights when we checkpoint the model during training.
        return self._replicated_model
      if hasattr(self, 'callback_model') and self.callback_model:
        return self.callback_model
      return self
function_tokens: def _get_callback_model ( self ) : if hasattr ( self , '_replicated_model' ) and self . _replicated_model : # When using training_distributed, we set the callback model # to an instance of the `DistributedModel` that we create in # the `compile` call. The `DistributedModel` is initialized # with the first replicated model. We need to set the callback # model to a DistributedModel to allow us to override saving # and loading weights when we checkpoint the model during training. return self . _replicated_model if hasattr ( self , 'callback_model' ) and self . callback_model : return self . callback_model return self