nn.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:crayimage 作者: yandexdataschool 项目源码 文件源码
def save(self, path):
    import os
    import os.path as osp

    try:
      import cPickle as pickle
    except:
      import pickle

    try:
      os.mkdir(path)
    except:
      pass

    with open(osp.join(path, 'args.pickled'), 'w') as f:
      pickle.dump((self._args, self._kwargs), f)

    with open(osp.join(path, 'weights.pickled'), 'w') as f:
      pickle.dump(
        layers.get_all_param_values(self.outputs),
        f
      )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号