(self, vocab: Vocab)
Instantiating MultiChannelEmbedding class

        Args:
            vocab (model.utils.Vocab): the instance of model.utils.Vocab
Instantiating MultiChannelEmbedding class
Instantiating MultiChannelEmbedding class
def __init__(self, vocab: Vocab) -> None:
        """Instantiating MultiChannelEmbedding class

        Args:
            vocab (model.utils.Vocab): the instance of model.utils.Vocab
        """
        super(MultiChannelEmbedding, self).__init__()
        self._static = nn.Embedding.from_pretrained(
            torch.from_numpy(vocab.embedding),
            freeze=True,
            padding_idx=vocab.to_indices(vocab.padding_token),
        )
        self._non_static = nn.Embedding.from_pretrained(
            torch.from_numpy(vocab.embedding),
            freeze=False,
            padding_idx=vocab.to_indices(vocab.padding_token),
        )
def __init__ ( self , vocab : Vocab ) -> None : super ( MultiChannelEmbedding , self ) . __init__ ( ) self . _static = nn . Embedding . from_pretrained ( torch . from_numpy ( vocab . embedding ) , freeze = True , padding_idx = vocab . to_indices ( vocab . padding_token ) , ) self . _non_static = nn . Embedding . from_pretrained ( torch . from_numpy ( vocab . embedding ) , freeze = False , padding_idx = vocab . to_indices ( vocab . padding_token ) , )