Skip to content

How to save density _estimator after the NN is trained? #931

Answered by michaeldeistler
jsv1206 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there, it should be possible to pickle the density estimator. I.e.

import pickle

# Write.
with open("path.pkl", "wb") as handle:
    pickle.dump(density_estimator, handle)

# Read.
with open("path.pkl", "rb") as handle:
    density_estimator = pickle.load(handle)

(tested this on CPU only, please let me know if it leads to issues for you)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jsv1206
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