Issue with the exp layer when the base is e#3937
Conversation
|
Thanks @emaggiori, this does seem like a bug, yet I did write tests for what I think should be this exact case, and those are clearly passing. So I'm not sure what's going on yet...any ideas? Ideally this would include a new test demonstrating the bug and that it's now fixed & passing. |
|
Ah... I see now -- the bug is only triggered when (This is just one more piece of evidence in favor of modularity -- and in particular in favor of splitting off the scale/shift params from |
|
Hi, I added the tests. Let me know if this is okay. |
|
Great, thanks @emaggiori! Please squash your changes to a single commit and I'll merge this. |
a5c203e to
8ab995d
Compare
|
Thanks @jeffdonahue, I squashed them to a single commit as suggested. |
|
Looks good, thanks again @emaggiori. |
Issue with the exp layer when the base is e
This fixes a bug in the exp layer. In the case of the base e (set by the default parameter base==-1), the outer_scale_ variable was computed by taking -1 as a base instead of e.
The new code uses exp(input_shift) instead of pow(base, input_shift) when the base is set to -1.