class_docstr: Mapping from input to output embeddings using an MLP.
  
  This functions wraps a model that maps an embedding vector to another one in
  the same space (with the intent being to map obfuscated embeddings to clean
  ones). The mapping is performed using multi-layer perceptron.
  
  Attributes:
    mapping: Mapping MLP, taking obfuscated embeddings as input and
      returning clean ones.
class_docstr_tok: ["Mapping","from","input","to","output","embeddings","using","an","MLP",".","This","functions","wraps","a","model","that","maps","an","embedding","vector","to","another","one","in","the","same","space","(","with","the","intent","being","to","map","obfuscated","embeddings","to","clean","ones",")",".","The","mapping","is","performed","using","multi-layer","perceptron",".","Attributes",":","mapping",":","Mapping","MLP",",","taking","obfuscated","embeddings","as","input","and","returning","clean","ones","."]
code: def __init__(
      self,
      embed_dim: int,
      mlp_sizes: Sequence[int],
      weight_decay: float = 1e-4,
      final_activation: Optional[str] = "relu",
  ):
      super().__init__()
      self.mapping = tf.keras.Sequential()
      self.mapping.add(tf.keras.layers.Flatten())
      for i in range(len(mlp_sizes)):
          self.mapping.add(
              tf.keras.layers.Dense(
                  mlp_sizes[i],
                  activation="relu",
                  kernel_regularizer=tf.keras.regularizers.l2(
                      weight_decay
                  ),
                  bias_regularizer=tf.keras.regularizers.l2(
                      weight_decay
                  ),
                  name="mapping_{0:}".format(i),
              )
          )
  
      self.mapping.add(
          tf.keras.layers.Dense(
              embed_dim,
              activation=final_activation,
              kernel_regularizer=tf.keras.regularizers.l2(weight_decay),
              bias_regularizer=tf.keras.regularizers.l2(weight_decay),
              name="mapping_final",
          )
      )
  
imports: import abc
  from typing import Union, Tuple, Sequence, Optional
  import tensorflow
  import tensorflow_hub
label_desc: Use image node_id 1 to create a new MLPEmbeddingMapper object from inherited base classes: EmbeddingMapper with example: obj = MLPEmbeddingMapper(embed_dim, mlp_sizes, weight_decay, final_activation)