Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed the unnecessary softplus in NTMHeadBase._address_memory #6

Merged
merged 1 commit into from Mar 27, 2018
Merged

Conversation

JulesGM
Copy link
Contributor

@JulesGM JulesGM commented Mar 26, 2018

Removed the softplus in the softmax:

        s = F.softmax(F.softplus(s), dim=1)

softmax already constrains the values to (0, 1), the softplus doesn't achieve anything. Pytorch's softmax implementation is already numerically stable, so that's not the preoccupation.

Removed the softplus in the softmax:
```python
        s = F.softmax(F.softplus(s), dim=1)
```
softmax already constrains the values to (0, +inf), the softplus doesn't achieve much.
@loudinthecloud
Copy link
Owner

Makes sense, thanks for that. Can you please run the copy-task notebook and see we're getting the same results?

@JulesGM
Copy link
Contributor Author

JulesGM commented Mar 26, 2018

I trained a bunch of pretty long models, and get good results in the notebooks.

@JulesGM
Copy link
Contributor Author

JulesGM commented Mar 27, 2018

Like this one, which was trained for a while on sequences up to 120 long, and converges very sharply

copy-train-120

@loudinthecloud loudinthecloud merged commit d7b3840 into loudinthecloud:master Mar 27, 2018
@loudinthecloud
Copy link
Owner

Tested it as well, seems to alter convergence a bit but perhaps for the better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants