class_docstr: A generalized version of all possible networks implemented using tensorflow.
class_docstr_tok: ["A","generalized","version","of","all","possible","networks","implemented","using","tensorflow","."]
code: def __str__(self):
      result = []
  
      for network in range(self.num_networks):
          network_structure = []
  
          # embedder
          for embedder in self.input_embedders:
              network_structure.append(
                  "Input Embedder: {}".format(embedder.name)
              )
              network_structure.append(indent_string(str(embedder)))
  
          if len(self.input_embedders) > 1:
              network_structure.append(
                  "{} ({})".format(
                      self.network_parameters.embedding_merger_type.name,
                      ", ".join(
                          [
                              "{} embedding".format(e.name)
                              for e in self.input_embedders
                          ]
                      ),
                  )
              )
  
          # middleware
          network_structure.append("Middleware:")
          network_structure.append(indent_string(str(self.middleware)))
  
          # head
          if self.network_parameters.use_separate_networks_per_head:
              heads = range(network, network + 1)
          else:
              heads = range(0, len(self.output_heads))
  
          for head_idx in heads:
              head = self.output_heads[head_idx]
              head_params = self.network_parameters.heads_parameters[
                  head_idx
              ]
              if head_params.num_output_head_copies > 1:
                  network_structure.append(
                      "Output Head: {} (num copies = {})".format(
                          head.name, head_params.num_output_head_copies
                      )
                  )
              else:
                  network_structure.append(
                      "Output Head: {}".format(head.name)
                  )
                  network_structure.append(indent_string(str(head)))
  
          # finalize network
          if self.num_networks > 1:
              result.append(
                  "Sub-network for head: {}".format(
                      self.output_heads[network].name
                  )
              )
              result.append(indent_string("\n".join(network_structure)))
          else:
              result.append("\n".join(network_structure))
  
      result = "\n".join(result)
      return result
  
imports: import copy
  from types import MethodType
  from typing import Dict, List, Union
  import numpy
  import tensorflow
  from rl_coach.architectures.embedder_parameters import InputEmbedderParameters
  from rl_coach.architectures.head_parameters import HeadParameters
  from rl_coach.architectures.middleware_parameters import MiddlewareParameters
  from rl_coach.architectures.tensorflow_components.architecture import TensorFlowArchitecture
  from rl_coach.architectures.tensorflow_components import utils
  from rl_coach.base_parameters import AgentParameters, Device, DeviceType, EmbeddingMergerType
  from rl_coach.core_types import PredictionType
  from rl_coach.logger import screen
  from rl_coach.spaces import SpacesDefinition, PlanarMapsObservationSpace, TensorObservationSpace
  from rl_coach.utils import get_all_subclasses, dynamic_import_and_instantiate_module_from_params, indent_string
label_desc: Use image node_id 10 for calling the GeneralTensorFlowNetwork obj's underlying member method code with example usage: obj.__str__() and returns: result