def cnn_save(self, savepath='cnn.pkl'):
"""Save the trained network
input
=====
savepath: str
Path of the net to be saved
"""
import sys
sys.setrecursionlimit(1000000)
import pickle
fp = open(savepath, 'wb')
# write
pickle.dump(self.net, fp)
fp.close()
评论列表
文章目录