def load(self, filepath):
"""Load the optimizer parameters from the specifiec path as JSON.
Parameters
----------
filepath: str
The file path.
"""
with open(filepath, 'r') as f:
json = f.read()
model = jsonpickle.decode(json)
self.__dict__.update(model.__dict__)
评论列表
文章目录