def __init__(
        self, vocab_size, embedding_dim, hidden_dim, num_layers, rnn_type="GRU"
    ):
        """Initialize all the parameters.

        Args:
            vocab_size (int): Size of the vocabulary.
            embedding_dim (int): the size of each embedding vector
            hidden_dim (int): the size of each hidden vector
            num_layers (int): the number of layers.
            rnn_type (str): Type of RNN.
        """
        super(Encoder, self).__init__()
        self.rnn_type = rnn_type
        rnn = getattr(nn, rnn_type)
        self.src_embedding = nn.Embedding(
            num_embeddings=vocab_size, embedding_dim=embedding_dim
        )

        self.encoder = rnn(
            input_size=embedding_dim,
            hidden_size=hidden_dim,
            num_layers=num_layers,
            batch_first=True,
            bidirectional=True,
        )
Initialize all the parameters.

        Args:
            vocab_size (int): Size of the vocabulary.
            embedding_dim (int): the size of each embedding vector
            hidden_dim (int): the size of each hidden vector
            num_layers (int): the number of layers.
            rnn_type (str): Type of RNN.
        
utils_nlp/models/gensen/gensen.py