class_docstr: An input embedder is the first part of the network, which takes the input from the state and produces a vector
  embedding by passing it through a neural network. The embedder will mostly be input type dependent, and there
  can be multiple embedders in a single network
class_docstr_tok: ["An","input","embedder","is","the","first","part","of","the","network",",","which","takes","the","input","from","the","state","and","produces","a","vector","embedding","by","passing","it","through","a","neural","network",".","The","embedder","will","mostly","be","input","type","dependent",",","and","there","can","be","multiple","embedders","in","a","single","network"]
code: def __init__(
      self,
      input_size: List[int],
      activation_function=tf.nn.relu,
      scheme: EmbedderScheme = None,
      batchnorm: bool = False,
      dropout_rate: float = 0.0,
      name: str = "embedder",
      input_rescaling=1.0,
      input_offset=0.0,
      input_clipping=None,
      dense_layer=Dense,
      is_training=False,
      flatten=True,
  ):
      self.name = name
      self.input_size = input_size
      self.activation_function = activation_function
      self.batchnorm = batchnorm
      self.dropout_rate = dropout_rate
      self.input = None
      self.output = None
      self.scheme = scheme
      self.return_type = InputEmbedding
      self.layers_params = []
      self.layers = []
      self.input_rescaling = input_rescaling
      self.input_offset = input_offset
      self.input_clipping = input_clipping
      self.dense_layer = dense_layer
      if self.dense_layer is None:
          self.dense_layer = Dense
      self.is_training = is_training
      self.flatten = flatten
  
      # layers order is conv -> batchnorm -> activation -> dropout
      if isinstance(self.scheme, EmbedderScheme):
          self.layers_params = copy.copy(self.schemes[self.scheme])
          self.layers_params = [
              convert_layer(l) for l in self.layers_params
          ]
      else:
          # if scheme is specified directly, convert to TF layer if it's not a callable object
          # NOTE: if layer object is callable, it must return a TF tensor when invoked
          self.layers_params = [
              convert_layer(l) for l in copy.copy(self.scheme)
          ]
  
      # we allow adding batchnorm, dropout or activation functions after each layer.
      # The motivation is to simplify the transition between a network with batchnorm and a network without
      # batchnorm to a single flag (the same applies to activation function and dropout)
      if (
          self.batchnorm
          or self.activation_function
          or self.dropout_rate > 0
      ):
          for layer_idx in reversed(range(len(self.layers_params))):
              self.layers_params.insert(
                  layer_idx + 1,
                  BatchnormActivationDropout(
                      batchnorm=self.batchnorm,
                      activation_function=self.activation_function,
                      dropout_rate=self.dropout_rate,
                  ),
              )
  
file_path: coach/rl_coach/architectures/tensorflow_components/embedders/embedder.py
imports: from typing import List, Union, Tuple
  import copy
  import numpy
  import tensorflow
  from rl_coach.architectures.tensorflow_components.layers import BatchnormActivationDropout, convert_layer, Dense, Flatten
  from rl_coach.base_parameters import EmbedderScheme, NetworkComponentParameters
  from rl_coach.core_types import InputEmbedding
  from rl_coach.utils import force_list
label_desc: Use image node_id 1 to create a new InputEmbedder object from inherited base classes: object with example: obj = InputEmbedder(input_size, activation_function, scheme, batchnorm, dropout_rate, name, input_rescaling, input_offset, input_clipping, dense_layer, is_training, flatten)