(self, num_classes: int, lstm_hidden_dim: int, hidden_dim: int, da: int, r: int, vocab: Vocab)
Args:
            num_classes (int): the number of classes
            lstm_hidden_dim (int): the number of features in the hidden states in bi-directional lstm
            hidden_dim (int): the number of features in hidden layer from mlp
            da (int): the number of features in hidden layer from self-attention
            r (int): the number of aspects of self-attention
            vocab (gluonnlp.Vocab): the instance of gluonnlp.Vocab
Args:
            num_classes (int): the number of classes
            lstm_hidden_dim (int): the number of features in the hidden states in bi-directional lstm
            hidden_dim (int): the number of features in hidden layer from mlp
            da (int): the number of features in hidden layer from self-attention
            r (int): the number of aspects of self-attention
            vocab (gluonnlp.Vocab): the instance of gluonnlp.Vocab
Args : num_classes ( int ) : the number of classes lstm_hidden_dim ( int ) : the number of features in the hidden states in bi - directional lstm hidden_dim ( int ) : the number of features in hidden layer from mlp da ( int ) : the number of features in hidden layer from self - attention r ( int ) : the number of aspects of self - attention vocab ( gluonnlp . Vocab ) : the instance of gluonnlp . Vocab
def __init__(self, num_classes: int, lstm_hidden_dim: int, hidden_dim: int, da: int, r: int, vocab: Vocab) -> None:
        """
        Args:
            num_classes (int): the number of classes
            lstm_hidden_dim (int): the number of features in the hidden states in bi-directional lstm
            hidden_dim (int): the number of features in hidden layer from mlp
            da (int): the number of features in hidden layer from self-attention
            r (int): the number of aspects of self-attention
            vocab (gluonnlp.Vocab): the instance of gluonnlp.Vocab
        """
        super(SAN, self).__init__()
        self._encoder = SentenceEncoder(lstm_hidden_dim, da, r, vocab)
        self._wa = nn.Parameter(torch.randn(lstm_hidden_dim * 2, lstm_hidden_dim * 2))
        self._wb = nn.Parameter(torch.randn(lstm_hidden_dim * 2, lstm_hidden_dim * 2))
        self._fc1 = nn.Linear(r * lstm_hidden_dim * 2, hidden_dim)
        self._fc2 = nn.Linear(hidden_dim, num_classes)
def __init__ ( self , num_classes : int , lstm_hidden_dim : int , hidden_dim : int , da : int , r : int , vocab : Vocab ) -> None : super ( SAN , self ) . __init__ ( ) self . _encoder = SentenceEncoder ( lstm_hidden_dim , da , r , vocab ) self . _wa = nn . Parameter ( torch . randn ( lstm_hidden_dim * 2 , lstm_hidden_dim * 2 ) ) self . _wb = nn . Parameter ( torch . randn ( lstm_hidden_dim * 2 , lstm_hidden_dim * 2 ) ) self . _fc1 = nn . Linear ( r * lstm_hidden_dim * 2 , hidden_dim ) self . _fc2 = nn . Linear ( hidden_dim , num_classes )