code: def test_network_has_specified_number_of_layers(self):
      # Checks which actor layers are found in the param dict.
      actor_layer_names = {
          x
          for x in self.params["params"]
          if x.startswith("_actor_layers_")
      }
      with self.subTest("actor"):
          self.assertLen(actor_layer_names, self.num_layers)
          self.assertIn("_actor_final_layer", self.params["params"])
  
      critic1_layer_names = {
          x
          for x in self.params["params"]["_critic1"]
          if x.startswith("Dense_")
      }
      critic2_layer_names = {
          x
          for x in self.params["params"]["_critic2"]
          if x.startswith("Dense_")
      }
      with self.subTest("critic1"):
          # n hidden layers + 1 output layer.
          self.assertLen(critic1_layer_names, self.num_layers + 1)
      with self.subTest("critic2"):
          # n hidden layers + 1 output layer.
          self.assertLen(critic2_layer_names, self.num_layers + 1)
  
file_path: dopamine/tests/dopamine/jax/continuous_networks_test.py
imports: from absl.testing import absltest
  from dopamine.jax import continuous_networks
  import jax
  from jax import numpy
label_desc: Use image node_id 7 for calling the SacNetworkTest obj's underlying member method code with example usage: obj.test_network_has_specified_number_of_layers() without return types