Open vgoklani opened 2 years ago
I don't actually recall the exact reason, I vaguely recall something about an issue retrieving the backpropped gradients for float variables. The details evade me right now unfortunately. Glad you got it to work like this. I was hoping in the future to relegate attribution to the Captum library.
Hey there,
Thanks for releasing this library! I was reviewing your lm.py file, and in particular, I was unclear why you were constructing one-hot vectors and multiplying by the embedding matrix, as opposed to simply applying the embedding directly.
See here:
https://github.com/jalammar/ecco/blob/main/src/ecco/lm.py#L118
my approach:
this is because the embedding is a sequence with multiple functions:
if I instead just apply the word_embedding directly, I then recover your solution: