NLP, Interpretability, Machine Learning, Pytorch, Captum.
model.embeddings.embedding in this case. Second, we need to define a baseline. Here, it will be an all padding tokens sentence: [CLS], [PAD], [PAD], …, [SEP] Then we can apply the Integrated gradient approach: tokenized = tokenize(text) tokens_idx = tokenized.ids[:MAX_LEN] x =