examples icon indicating copy to clipboard operation
examples copied to clipboard

example time_sequence_prediction does not produce expected output

Open VeniVidiGavi opened this issue 8 years ago • 5 comments

https://github.com/pytorch/examples/tree/master/time_sequence_prediction

After a few steps, the loss suddenly jumps up and stays high: loss: 0.00101216329969 loss: 0.195070432582

the pdf0 is OK, pdf1 is OK but from pdf2 the graph becomes an "L "

VeniVidiGavi avatar Oct 27 '17 19:10 VeniVidiGavi

#243

philippslang avatar Oct 31 '17 09:10 philippslang

Yup, see #243

barnabytprowe avatar Nov 01 '17 21:11 barnabytprowe

FYI: 4 years later and I'm having the same problem with time_sequence_prediction not being able to reproduce the expected results. My loss explodes after the 4th or 5th epoch. Changing the output layer to Linear, as is posed as the solution to this problem in #250, does not seem to fix this.

I'm guessing it's still a problem with learning rate being too high, but as the example doesn't work as it is currently written.

rallen10 avatar Dec 20 '21 21:12 rallen10

@rallen10 Thanks for raising this. I agree, this example's learning rate is (way) too high and the exploding loss resolves by setting it to something like 0.001.

I'll leave this open for a "good first issue"; along with fixing the learning rate, this example could also use a refactor ;)

subramen avatar Mar 10 '22 02:03 subramen

Hi @subramen and @msaroufim , I've made the changes and created a pull request. Could one of you please review it?

anikethc avatar Sep 28 '23 23:09 anikethc