Skip to content

LeNetApp example not converging #42

Answered by sbrunk
hmf asked this question in Q&A
Jul 19, 2023 · 3 comments · 5 replies
Discussion options

You must be logged in to vote

I was able to reproduce the diverging loss on Linux. Interestingly, it does not diverge on a MacOS machine.

Could you try to reduce the learning rate like so?

-  val optimizer = Adam(model.parameters, lr = 0.001)
+  val optimizer = Adam(model.parameters, lr = 1e-5))

In my case with that learning rate it did converge reliably then on Linux as well, but I'm still wondering why it behaves different here.

Note that even with CUDA enabled, the LeNet example currently runs on the CPU. I've fixed that now locally, PR coming soon.

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@sbrunk
Comment options

@hmf
Comment options

@sbrunk
Comment options

Answer selected by hmf
@sbrunk
Comment options

@hmf
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants