train.py 文件源码

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

项目:enhance 作者: cdiazbas 项目源码 文件源码
def __init__(self, root, depth, losses, extra, **kwargs):        
        self.losses = losses
        self.losses_batch = copy.deepcopy(losses)
        self.extra = extra

        # self.f_epoch = open("/net/vena/scratch/Dropbox/GIT/DeepLearning/losses/{0}_loss.json".format(platform.node()), 'w')
        # self.f_batch = open("/net/vena/scratch/Dropbox/GIT/DeepLearning/losses/{0}_loss_batch.json".format(platform.node()), 'w')
        # self.f_epoch.write('['+json.dumps(self.extra))
        # self.f_batch.write('['+json.dumps(self.extra))

        self.f_epoch_local = open("{0}_{1}_loss.json".format(root, depth), 'w')
        self.f_batch_local = open("{0}_{1}_loss_batch.json".format(root, depth), 'w')
        self.f_epoch_local.write('['+json.dumps(self.extra))
        self.f_batch_local.write('['+json.dumps(self.extra))

        # flush_file(self.f_batch)
        flush_file(self.f_batch_local)
        # flush_file(self.f_epoch)
        flush_file(self.f_epoch_local)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号