grid_search.py 文件源码

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

项目:textvae 作者: stas-semeniuta 项目源码 文件源码
def __init__(self, config="grid.json"):
        if os.path.exists("exp/gridlogs") is False:
            os.makedirs("exp/gridlogs")
        with open(config) as f:
            s = f.read()
        conf = json.JSONDecoder().decode(s)
        self.filename = conf["filename"]
        self.gpus = conf["gpus"]
        self.prefix = conf["prefix"] if "prefix" in conf else "-"
        self.processes = [None for _ in xrange(len(self.gpus))]
        self.runs = self.get_runs(conf["grid"])
        self.launched_runs = 0
        self.finished_runs = 0
        print "%d total runs on gpus %s:" % (len(self.runs), self.gpus)
        for i in xrange(len(self.runs)):
            print self.runs[i]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号