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

Add linear layer to time series prediction #250

Merged
merged 1 commit into from
Nov 9, 2017
Merged

Conversation

t-vi
Copy link
Contributor

@t-vi t-vi commented Nov 9, 2017

As is the final network output is modulated with a tanh nonlinearity.
This is undesirable. As a simple / realistic fix we add a final
linear layer.

This addresses #243.

As is the final network output is modulated with a tanh nonlinearity.
This is undesirable. As a simple / realistic fix we add a final
linear layer.
@soumith soumith merged commit 62d5ca5 into pytorch:master Nov 9, 2017
@soumith
Copy link
Member

soumith commented Nov 9, 2017

thanks a lot for investigating and fixing it Thomas!

@barnabytprowe
Copy link

Nice!

@barnabytprowe
Copy link

A quick question @t-vi , as someone interested to learn - was the tanh nonlinearity in the output a bad idea in this specific example, or is it one in general?

@t-vi
Copy link
Contributor Author

t-vi commented Nov 19, 2017

@barnabytprowe, it really depends on the nature of what you are learning. Here, the tanh would have required the input to the tanh to get extremely large/small to reproduce values at +/- 1 or very close. This - that you need extremely large values - is a bad idea in general.
On the other hand, if you know that values close to +/-1 are extremely improbable, you might go with tanh at the end.
(we might move to the discussion forums, I'm tom there)

@barnabytprowe
Copy link

A belated thank you for the explanation @t-vi / Tom - makes total sense

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.

3 participants