class_docstr: A small encoder module that reduces the dimensionality
  and normalizes word embeddings
  
  Arguments
  ---------
  word_emb_dim: int
      the dimension of the original word embeddings
  word_emb_enc_dim: int
      the dimension of the encoded word embeddings
  norm: torch.nn.Module
      the normalization to be used (
          e.g. speechbrain.nnet.normalization.LayerNorm)
  norm_type: str
      the type of normalization to be used
code: def __init__(
      self, word_emb_dim, word_emb_enc_dim, norm=None, norm_type=None
  ):
      super().__init__()
      self.word_emb_dim = word_emb_dim
      self.word_emb_enc_dim = word_emb_enc_dim
      if norm_type:
          self.norm = self._get_norm(norm_type, word_emb_dim)
      else:
          self.norm = norm
      self.lin = Linear(
          n_neurons=word_emb_enc_dim, input_size=word_emb_dim
      )
      self.activation = nn.Tanh()
  
imports: from speechbrain.lobes.models.transformer.Transformer import TransformerInterface, get_lookahead_mask, get_key_padding_mask
  import torch
  from torch import nn
  from speechbrain.nnet.linear import Linear
  from speechbrain.nnet import normalization
label_desc: Use image node_id 1 to create a new WordEmbeddingEncoder object from inherited base classes: nn with example: obj = WordEmbeddingEncoder(word_emb_dim, word_emb_enc_dim, norm, norm_type)