Potential Memory Leakage #939
-
Hi, I've encountered a memory problem when using Netket for drawing samples while using optimizers from different packages. I attached a working code to hopefully provide some concreteness. In short, I'm using a gradient-free optimizer (COBYLA) to optimize the parameters of an RBM with respect to a cost function defined using the samples generated using Netket packages. However, when running this for graph sizes above 50 with parallel MPI processes, the memory used grew rapidly and became problematic. I'm hoping to get some help regarding this issue. Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Does changing your initializer to # initializer for passing in the parameters wanted for the neural network
def custom_init(x, dtype=jnp.float_):
def init(key, shape, dtype=dtype):
a = blank(x)
return a
return nk.jax.HashablePartial(init) and leaving everything else exactly the same fix your issue? |
Beta Was this translation helpful? Give feedback.
Does changing your initializer to
and leaving everything else exactly the same fix your issue?