class_docstr: Block that connects a single embedder, with middleware and one to multiple heads
class_docstr_tok: ["Block","that","connects","a","single","embedder",",","with","middleware","and","one","to","multiple","heads"]
docstr: :param network_is_local: True if network is local
  :param network_name: name of the network
  :param agent_parameters: agent parameters
  :param in_emb_param_dict: dictionary of embedder name to embedding parameters
  :param embedding_merger_type: type of merging output of embedders: concatenate or sum
  :param middleware_param: middleware parameters
  :param head_param_list: list of head parameters, one per head type
  :param head_type_idx_start: start index for head type index counting
  :param spaces: state and action space definition
docstr_tok: [":","param","network_is_local",":","True","if","network","is","local",":","param","network_name",":","name","of","the","network",":","param","agent_parameters",":","agent","parameters",":","param","in_emb_param_dict",":","dictionary","of","embedder","name","to","embedding","parameters",":","param","embedding_merger_type",":","type","of","merging","output","of","embedders",":","concatenate","or","sum",":","param","middleware_param",":","middleware","parameters",":","param","head_param_list",":","list","of","head","parameters",",","one","per","head","type",":","param","head_type_idx_start",":","start","index","for","head","type","index","counting",":","param","spaces",":","state","and","action","space","definition"]
code: def __init__(
      self,
      network_is_local: bool,
      network_name: str,
      agent_parameters: AgentParameters,
      in_emb_param_dict: {str: InputEmbedderParameters},
      embedding_merger_type: EmbeddingMergerType,
      middleware_param: MiddlewareParameters,
      head_param_list: [HeadParameters],
      head_type_idx_start: int,
      spaces: SpacesDefinition,
      *args,
      **kwargs,
  ):
      """
      :param network_is_local: True if network is local
      :param network_name: name of the network
      :param agent_parameters: agent parameters
      :param in_emb_param_dict: dictionary of embedder name to embedding parameters
      :param embedding_merger_type: type of merging output of embedders: concatenate or sum
      :param middleware_param: middleware parameters
      :param head_param_list: list of head parameters, one per head type
      :param head_type_idx_start: start index for head type index counting
      :param spaces: state and action space definition
      """
      super(SingleModel, self).__init__(*args, **kwargs)
  
      self._embedding_merger_type = embedding_merger_type
      self._input_embedders = list()  # type: List[HybridBlock]
      self._output_heads = list()  # type: List[ScaledGradHead]
  
      with self.name_scope():
          for input_name in sorted(in_emb_param_dict):
              input_type = in_emb_param_dict[input_name]
              input_embedder = _get_input_embedder(
                  spaces, input_name, input_type
              )
              self.register_child(input_embedder)
              self._input_embedders.append(input_embedder)
  
          self.middleware = _get_middleware(middleware_param)
  
          for i, head_param in enumerate(head_param_list):
              for head_copy_idx in range(
                  head_param.num_output_head_copies
              ):
                  # create output head and add it to the output heads list
                  output_head = ScaledGradHead(
                      head_index=(head_type_idx_start + i)
                      * head_param.num_output_head_copies
                      + head_copy_idx,
                      head_type_index=head_type_idx_start + i,
                      network_name=network_name,
                      spaces=spaces,
                      network_is_local=network_is_local,
                      agent_params=agent_parameters,
                      head_params=head_param,
                  )
                  self.register_child(output_head)
                  self._output_heads.append(output_head)
  
imports: import copy
  from itertools import chain
  from typing import List, Tuple, Union
  from types import ModuleType
  import numpy
  import mxnet
  from mxnet import nd, sym
  from mxnet.gluon import HybridBlock
  from mxnet.ndarray import NDArray
  from mxnet.symbol import Symbol
  from rl_coach.base_parameters import NetworkParameters
  from rl_coach.architectures.embedder_parameters import InputEmbedderParameters
  from rl_coach.architectures.head_parameters import HeadParameters, PPOHeadParameters
  from rl_coach.architectures.head_parameters import PPOVHeadParameters, VHeadParameters, QHeadParameters
  from rl_coach.architectures.middleware_parameters import MiddlewareParameters
  from rl_coach.architectures.middleware_parameters import FCMiddlewareParameters, LSTMMiddlewareParameters
  from rl_coach.architectures.mxnet_components.architecture import MxnetArchitecture
  from rl_coach.architectures.mxnet_components.embedders import ImageEmbedder, TensorEmbedder, VectorEmbedder
  from rl_coach.architectures.mxnet_components.heads import Head, HeadLoss, PPOHead, PPOVHead, VHead, QHead
  from rl_coach.architectures.mxnet_components.middlewares import FCMiddleware, LSTMMiddleware
  from rl_coach.architectures.mxnet_components import utils
  from rl_coach.base_parameters import AgentParameters, Device, DeviceType, EmbeddingMergerType
  from rl_coach.spaces import SpacesDefinition, PlanarMapsObservationSpace, TensorObservationSpace
label_desc: Use image node_id 1 to create a new SingleModel object from inherited base classes: HybridBlock with example: obj = SingleModel(network_is_local, network_name, agent_parameters, in_emb_param_dict, embedding_merger_type, middleware_param, head_param_list, head_type_idx_start, spaces)