code: def make_networks(
      action_spec: types.NestedSpec,
      policy_layer_sizes: Sequence[int] = (10, 10),
      critic_layer_sizes: Sequence[int] = (10, 10),
  ) -> Dict[str, snt.Module]:
      """Creates networks used by the agent."""
      # Get total number of action dimensions from action spec.
      num_dimensions = np.prod(action_spec.shape, dtype=int)
  
      policy_network = snt.Sequential(
          [
              tf2_utils.batch_concat,
              networks.LayerNormMLP(
                  policy_layer_sizes, activate_final=True
              ),
              networks.MultivariateNormalDiagHead(
                  num_dimensions,
                  tanh_mean=True,
                  min_scale=0.3,
                  init_scale=0.7,
                  fixed_scale=False,
                  use_tfd_independent=False,
              ),
          ]
      )
      # The multiplexer concatenates the (maybe transformed) observations/actions.
      multiplexer = networks.CriticMultiplexer()
      critic_network = snt.Sequential(
          [
              multiplexer,
              networks.LayerNormMLP(
                  critic_layer_sizes, activate_final=True
              ),
              networks.NearZeroInitializedLinear(1),
          ]
      )
  
      return {
          "policy": policy_network,
          "critic": critic_network,
      }
  
file_path: acme/acme/agents/tf/svg0_prior/agent_test.py
imports: import sys
  from typing import Dict, Sequence
  import acme
  from acme import specs
  from acme import types
  from acme.agents.tf import svg0_prior
  from acme.testing import fakes
  from acme.tf import networks
  from acme.tf import utils
  import numpy
  import sonnet
  from absl.testing import absltest
label_desc: Use image node_id 1 for calling a global function with example usage: make_networks(action_spec, policy_layer_sizes, critic_layer_sizes) and returns: dict