class_docstr: Base class for RLlib's TensorFlow models.
  
  This class defines the interface for RLlib's TensorFlow models and checks
  whether inputs and outputs of __call__ are checked with `check_input_specs()` and
  `check_output_specs()` respectively.
class_docstr_tok: ["Base","class","for","RLlib","'s","TensorFlow","models",".","This","class","defines","the","interface","for","RLlib","'s","TensorFlow","models","and","checks","whether","inputs","and","outputs","of","__call__","are","checked","with","`","check_input_specs","(",")","`","and","`","check_output_specs","(",")","`","respectively","."]
docstr: Returns the output of this model for the given input.
  
  This method only makes sure that we have a spec-checked _forward() method.
  
  Args:
      input_dict: The input tensors.
      **kwargs: Forward compatibility kwargs.
  
  Returns:
      dict: The output tensors.
docstr_tok: ["Returns","the","output","of","this","model","for","the","given","input",".","This","method","only","makes","sure","that","we","have","a","spec-checked","_forward","(",")","method",".","Args",":","input_dict",":","The","input","tensors",".","*","*","kwargs",":","Forward","compatibility","kwargs",".","Returns",":","dict",":","The","output","tensors","."]
code: def call(self, input_dict: dict, **kwargs) -> dict:
      """Returns the output of this model for the given input.
  
      This method only makes sure that we have a spec-checked _forward() method.
  
      Args:
          input_dict: The input tensors.
          **kwargs: Forward compatibility kwargs.
  
      Returns:
          dict: The output tensors.
      """
  
      # When `always_check_shapes` is set, we always check input and output specs.
      # Note that we check the input specs twice because we need the following
      # check to always check the input specs.
      if self.config.always_check_shapes:
  
          @check_input_specs("input_specs", only_check_on_retry=False)
          @check_output_specs("output_specs")
          def checked_forward(self, input_data, **kwargs):
              return self._forward(input_data, **kwargs)
  
          return checked_forward(self, input_dict, **kwargs)
  
      return self._forward(input_dict, **kwargs)
  
file_path: ray/rllib/core/models/tf/base.py
imports: import abc
  import logging
  from typing import Tuple
  import numpy
  from ray.rllib.core.models.base import Model
  from ray.rllib.core.models.configs import ModelConfig
  from ray.rllib.core.models.specs.checker import check_input_specs, is_input_decorated, is_output_decorated, check_output_specs
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.framework import try_import_tf
  from ray.util import log_once
label_desc: Use image node_id 2 for calling the TfModel obj's underlying member method code with example usage: obj.call(input_dict) and returns: self, checked_forward, self