Replies: 6 comments 3 replies
-
Hi @skkestrel I think the NaNs are caused by SR. You are probably taking too large steps at the begininng (maybe try lowering the learning rate?) and eventually you get nans in the parameters. However, I'd point out that you are looking at legacy (netket v2) examples. I'd strongly invite you to play with the new netket. |
Beta Was this translation helpful? Give feedback.
-
I remember having to deal with something of the sort. Indeed, what happened is that gradients began to explode and nans were introduced in the machine's predictions. I believe I dealt with that successfully by adding regularisation, to keep parameter values "sane". I think |
Beta Was this translation helpful? Give feedback.
-
@skkestrel By the way, we pushed out an update fixing a few corner cases with BoseHubbard Hamiltonians. If you are going to trying netket 3 make sure to update. @VolodyaCO No, it got lost in the |
Beta Was this translation helpful? Give feedback.
-
Yeah @PhilipVinc, I mean, if @skkestrel continues to use |
Beta Was this translation helpful? Give feedback.
-
I converted the issue to a discussion as this is not about netket itself. Feel free to get back here for feedback on how to optimise the problems you are working on. |
Beta Was this translation helpful? Give feedback.
-
Thanks all for the help. This has been extremely informative for me. I have upgraded my code to netket 3 and I will try out just reducing the learning rate to prevent the gradients from blowing up immediately first - it seems to be working much better now. I'd also like to ask, is there a recommended method for working inside the whole subspace (i.e. not restricted to a certain boson number)? I have firstly set n_particles=None to remove the subspace restriction. However, MetropolisHamiltonian preserves particle number. Is there another built-in sampler that is suitable for working in variable particle number subspace? Thanks. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am running the following code (slightly modified from the examples)
and I get the following error during the Metropolis update step.
Can anyone advise as to how to resolve this error? It seems to be related to the parameters of the bose-hubbard Hamiltonian.
Beta Was this translation helpful? Give feedback.
All reactions