class_docstr: Wrapper class for networks specified as Keras model (specification key: `keras`).
  
  Args:
      model (tf.keras.Model): Keras model
          (<span style="color:#C00000"><b>required</b></span>).
      device (string): Device name
          (<span style="color:#00C000"><b>default</b></span>: inherit value of parent module).
      l2_regularization (float >= 0.0): Scalar controlling L2 regularization
          (<span style="color:#00C000"><b>default</b></span>: inherit value of parent module).
      name (string): <span style="color:#0000C0"><b>internal use</b></span>.
      inputs_spec (specification): <span style="color:#0000C0"><b>internal use</b></span>.
      outputs (iter[string]): <span style="color:#0000C0"><b>internal use</b></span>.
      kwargs: Arguments for the Keras model.
code: def output_spec(self):
      assert self.keras_model.compute_dtype in (tf.float32, tf.float64)
  
      if self.inputs_spec.is_singleton():
          input_shape = (None,) + self.inputs_spec.singleton().shape
      else:
          input_shape = [
              (None,) + spec.shape for spec in self.inputs_spec.values()
          ]
  
      output_shape = self.keras_model.compute_output_shape(
          input_shape=input_shape
      )
      assert (
          isinstance(output_shape, tf.TensorShape)
          and output_shape.rank == 2
      )
      output_shape = output_shape.as_list()
      assert output_shape[0] is None
  
      return TensorSpec(type="float", shape=(output_shape[1],))
  
file_path: tensorforce/tensorforce/core/networks/keras.py
imports: import tensorflow
  from tensorforce import TensorforceError
  from tensorforce.core import TensorSpec, tf_function, tf_util
  from tensorforce.core.networks import Network
label_desc: Use image node_id 3 for calling the KerasNetwork obj's underlying member method code with example usage: obj.output_spec() and returns: TensorSpec