Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问 import cPickle 这个包是哪个module下的? #28

Open
livelitoday opened this issue May 8, 2018 · 1 comment
Open

请问 import cPickle 这个包是哪个module下的? #28

livelitoday opened this issue May 8, 2018 · 1 comment

Comments

@livelitoday
Copy link

position:

保存训练参数的函数

def save_params(param1, param2, param3, param4):
import cPickle # <-----
write_file = open('params.pkl', 'wb')
cPickle.dump(param1, write_file, -1)
cPickle.dump(param2, write_file, -1)
cPickle.dump(param3, write_file, -1)
cPickle.dump(param4, write_file, -1)
write_file.close()

@AIshouldbecry
Copy link

python2 import cPickle
python3 import pickle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants