class_docstr: A keras Layer, which intercepts its inputs and stored them as pickled.
class_docstr_tok: ["A","keras","Layer",",","which","intercepts","its","inputs","and","stored","them","as","pickled","."]
docstr: Does a forward pass through our Dense, but also intercepts inputs.
docstr_tok: ["Does","a","forward","pass","through","our","Dense",",","but","also","intercepts","inputs","."]
code: def call(self, inputs, **kwargs):
      """Does a forward pass through our Dense, but also intercepts inputs."""
  
      del kwargs
      spy_fn = tf1.py_func(
          self.spy,
          [
              inputs[0],  # observations
              inputs[2],  # seq_lens
              inputs[3],  # h_in
              inputs[4],  # c_in
              inputs[5],  # h_out
              inputs[6],  # c_out
          ],
          tf.int64,  # Must match SpyLayer.output's type.
          stateful=True,
      )
  
      # Compute outputs
      with tf1.control_dependencies([spy_fn]):
          return self.dense(inputs[1])
  
file_path: ray/python/ray/rllib/examples/models/rnn_spy_model.py
imports: import numpy
  import pickle
  import ray
  from ray.rllib.models.modelv2 import ModelV2
  from ray.rllib.models.tf.misc import normc_initializer
  from ray.rllib.models.tf.recurrent_net import RecurrentNetwork
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.framework import try_import_tf
label_desc: Use image node_id 2 for calling the SpyLayer obj's underlying member method code with example usage: obj.call(inputs) and returns: self