NLP, Interpretability, Machine Learning, Pytorch, Captum.
self.embeddings = TokenEmbedding(...) self.pos_encoder = PositionalEncoding(...) encoder_layer = torch.nn.TransformerEncoderLayer( ...) self.encoder = torch.nn.TransformerEncoder( ... ) self.linear = torch.nn.Linear(channels, self.n_outputs) self.do = nn.Dropout(p=self.dropout) def encode(self, x):