class_docstr: An example for a non-Keras ModelV2 in tf that learns a single weight.
  
  Defines all network architecture in `forward` (not `__init__` as it's
  usually done for Keras-style TFModelV2s).
class_docstr_tok: ["An","example","for","a","non-Keras","ModelV2","in","tf","that","learns","a","single","weight",".","Defines","all","network","architecture","in","`","forward","`","(","not","`","__init__","`","as","it's","usually","done","for","Keras-style","TFModelV2s",")","."]
code: def forward(self, input_dict, state, seq_lens):
      with tf1.variable_scope("model", reuse=tf1.AUTO_REUSE):
          bias = tf1.get_variable(
              dtype=tf.float32,
              name="bias",
              initializer=tf.keras.initializers.Zeros(),
              shape=(),
          )
          output = bias + tf.zeros(
              [tf.shape(input_dict["obs"])[0], self.num_outputs]
          )
          self._value_out = tf.reduce_mean(output, -1)  # fake value
  
      if not self._registered:
          self.register_variables(
              tf1.get_collection(
                  tf1.GraphKeys.TRAINABLE_VARIABLES, scope=".+/model/.+"
              )
          )
          self._registered = True
  
      return output, []
  
file_path: ray/rllib/examples/models/fast_model.py
imports: from ray.rllib.models.modelv2 import ModelV2
  from ray.rllib.models.tf.tf_modelv2 import TFModelV2
  from ray.rllib.models.torch.misc import SlimFC
  from ray.rllib.models.torch.torch_modelv2 import TorchModelV2
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.framework import try_import_tf, try_import_torch
label_desc: Use image node_id 2 for calling the FastModel obj's underlying member method code with example usage: obj.forward(input_dict, state, seq_lens) and returns: output,  list