mxnet_model.py 文件源码

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

项目:char-rnn-text-generation 作者: yxtay 项目源码 文件源码
def load(cls, checkpoint_path, ctx=mx.cpu(), **kwargs):
        """
        loads model from checkpoint_path.
        """
        with open("{}.json".format(checkpoint_path)) as f:
            model_args = json.load(f)
        model = cls(**model_args, **kwargs)
        model.load_params(checkpoint_path, ctx)
        logger.info("model loaded: %s.", checkpoint_path)
        return model
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号