Skip to content

Potential Memory Leakage #939

Answered by PhilipVinc
dannychen0830 asked this question in Q&A
Discussion options

You must be logged in to vote

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?

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@PhilipVinc
Comment options

@PhilipVinc
Comment options

@dannychen0830
Comment options

Answer selected by PhilipVinc
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