active_inference_basic.py 文件源码

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

项目:actinf 作者: x75 项目源码 文件源码
def main(args):

    # seed PRNG
    np.random.seed(args.seed)

    pl.ion()

    if args.mode.startswith("test_"):
        test_models(args)
    else:
        idim = None
        # if args.mode.startswith("type03_1"):
        #     idim = 3
        # print "args.goal_sample_interval", args.goal_sample_interval

        # initialize experiment
        inf = ActiveInferenceExperiment(
            args.mode, args.model, args.numsteps,
            idim = idim,
            environment_str = args.environment,
            goal_sample_interval = args.goal_sample_interval,
            e2pmodel = args.e2pmodel,
            saveplots = SAVEPLOTS)

        # run experiment
        inf.run()

    # wait for plots to be closed
    pl.ioff()
    pl.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号