code: def test_keras_network(self):
      self.start_tests(name="keras network")
  
      import tensorflow as tf
  
      class Model(tf.keras.Model):
          def __init__(self):
              super().__init__()
              self.layer1 = tf.keras.layers.Dense(
                  4, activation=tf.nn.relu
              )
              self.layer2 = tf.keras.layers.Dense(
                  5, activation=tf.nn.relu
              )
  
          def call(self, inputs):
              x = self.layer1(inputs)
              return self.layer2(x)
  
      states = dict(
          type="float", shape=(3,), min_value=1.0, max_value=2.0
      )
      self.unittest(states=states, policy=Model)
  
      class Model(tf.keras.Model):
          def __init__(self, size):
              super().__init__()
              self.layer1 = tf.keras.layers.Dense(
                  4, activation=tf.nn.relu
              )
              self.layer2 = tf.keras.layers.Embedding(4, 4)
              self.layer3 = tf.keras.layers.Dense(
                  size, activation=tf.nn.relu
              )
  
          def call(self, inputs):
              y = self.layer1(inputs[0])
              x = self.layer2(inputs[1])
              return self.layer3(tf.concat(values=[x, y], axis=1))
  
      states = dict(
          int_state=dict(type="int", shape=(), num_values=4),
          float_state=dict(
              type="float", shape=(3,), min_value=1.0, max_value=2.0
          ),
      )
      self.unittest(
          states=states,
          policy=dict(network=dict(type="keras", model=Model, size=5)),
      )
  
      self.unittest(states=states, policy=Model(size=5))
  
      def model(size):
          return Model(size=size)
  
      self.unittest(
          states=states,
          policy=dict(network=dict(type="keras", model=model, size=5)),
      )
  
file_path: tensorforce/test/test_policies.py
imports: import unittest
  from test.unittest_base import UnittestBase
label_desc: Use image node_id 1 for calling the TestPolicies obj's underlying member method code with example usage: obj.test_keras_network() and returns: Model, self, self