• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python experiment.init_experiment函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中neuralnilm.experiment.init_experiment函数的典型用法代码示例。如果您正苦于以下问题:Python init_experiment函数的具体用法?Python init_experiment怎么用?Python init_experiment使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了init_experiment函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: main

def main():
    APPLIANCES = [
        ('a', ['fridge freezer', 'fridge'], 512),
        ('b', "'coffee maker'", 512),
        ('c', "'dish washer'", 2000),
        ('d', "'hair dryer'", 256),
        ('e', "'kettle'", 256),
        ('f', "'oven'", 2000),
        ('g', "'toaster'", 256),
        ('h', "'light'", 2000),
        ('i', ['washer dryer', 'washing machine'], 1504)
    ]
    for experiment, appliance, seq_length in APPLIANCES[-1:]:
        full_exp_name = NAME + experiment
        func_call = init_experiment(PATH, 'a', full_exp_name)
        func_call = func_call[:-1] + ", {}, {})".format(appliance, seq_length)
        logger = logging.getLogger(full_exp_name)
        try:
            net = eval(func_call)
            run_experiment(net, epochs=5000)
        except KeyboardInterrupt:
            logger.info("KeyboardInterrupt")
            break
        except Exception as exception:
            logger.exception("Exception")
            # raise
        else:
            del net.source
            del net
            gc.collect()
        finally:
            logging.shutdown()
开发者ID:mmottahedi,项目名称:neuralnilm_prototype,代码行数:32,代码来源:e498.py


示例2: main

def main():
    APPLIANCES = [
        ("a", ["fridge freezer", "fridge"], 512),
        ("b", "'coffee maker'", 512),
        ("c", "'dish washer'", 2000),
        ("d", "'hair dryer'", 256),
        ("e", "'kettle'", 256),
        ("f", "'oven'", 2000),
        ("g", "'toaster'", 256),
        ("h", "'light'", 2000),
        ("i", ["washer dryer", "washing machine"], 1504),
    ]
    for experiment, appliance, seq_length in APPLIANCES[-1:]:
        full_exp_name = NAME + experiment
        func_call = init_experiment(PATH, "a", full_exp_name)
        func_call = func_call[:-1] + ", {}, {})".format(appliance, seq_length)
        logger = logging.getLogger(full_exp_name)
        try:
            net = eval(func_call)
            run_experiment(net, epochs=None)
        except KeyboardInterrupt:
            logger.info("KeyboardInterrupt")
            break
        except Exception as exception:
            logger.exception("Exception")
            # raise
        else:
            del net.source
            del net
            gc.collect()
        finally:
            logging.shutdown()
开发者ID:mmottahedi,项目名称:neuralnilm_prototype,代码行数:32,代码来源:e491.py


示例3: main

def main():
    # EXPERIMENTS = list('abcdefghijklmnopqrstuvwxyz')
    EXPERIMENTS = list('z')
    for experiment in EXPERIMENTS:
        full_exp_name = NAME + experiment
        func_call = init_experiment(PATH, experiment, full_exp_name)
        logger = logging.getLogger(full_exp_name)
        try:
            net = eval(func_call)
            run_experiment(net, epochs=None)
        except KeyboardInterrupt:
            logger.info("KeyboardInterrupt")
            break
        except Exception as exception:
            logger.exception("Exception")
开发者ID:mmottahedi,项目名称:neuralnilm_prototype,代码行数:15,代码来源:e277.py


示例4: main

def main():
    EXPERIMENTS = list('a')
    for experiment in EXPERIMENTS:
        full_exp_name = NAME + experiment
        func_call = init_experiment(PATH, experiment, full_exp_name)
        logger = logging.getLogger(full_exp_name)
        try:
            net = eval(func_call)
            run_experiment(net, epochs=None)
        except KeyboardInterrupt:
            logger.info("KeyboardInterrupt")
            break
        except Exception:
            logger.exception("Exception")
            # raise
        finally:
            logging.shutdown()
开发者ID:mmottahedi,项目名称:neuralnilm_prototype,代码行数:17,代码来源:e554.py


示例5: main

def main():
    EXPERIMENTS = list("a")
    for experiment in EXPERIMENTS:
        full_exp_name = NAME + experiment
        func_call = init_experiment(PATH, experiment, full_exp_name)
        logger = logging.getLogger(full_exp_name)
        try:
            net = eval(func_call)
            run_experiment(net, epochs=None)
        except KeyboardInterrupt:
            logger.info("KeyboardInterrupt")
            break
        except Exception as exception:
            logger.exception("Exception")
            # raise
        else:
            del net.source.train_activations
            gc.collect()
        finally:
            logging.shutdown()
开发者ID:mmottahedi,项目名称:neuralnilm_prototype,代码行数:20,代码来源:e426.py



注:本文中的neuralnilm.experiment.init_experiment函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python experiment.run_experiment函数代码示例发布时间:2022-05-27
下一篇:
Python neuralnilm.RealApplianceSource类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap