23a204d75f91c85bb542269447dbfa2164c695ce,ch13/wob_click_train.py,,,#,27

Before Change


    env = wob_vnc.MiniWoBCropper(env)

    env.configure(remotes=REMOTE_ADDR)
    obs = env.reset()

    net = model_vnc.Model(input_shape=(3, wob_vnc.HEIGHT, wob_vnc.WIDTH),
                          n_actions=env.action_space.n)
    print(net)

After Change



    agent = ptan.agent.PolicyAgent(lambda x: net(x)[0], cuda=args.cuda,
                                   apply_softmax=True)
    exp_source = ptan.experience.ExperienceSourceFirstLast(
        [env], agent, gamma=GAMMA, steps_count=REWARD_STEPS, vectorized=True)

    // obs, reward, done, info = step_env(env, env.action_space.sample())
    // obs_v = Variable(torch.from_numpy(np.array(obs)))
    // r = net(obs_v)
    // print(r[0].size(), r[1].size())

    for idx, exp in enumerate(exp_source):
        print(exp)
        if idx > 100:
            break
        time.sleep(0.5)

    pass
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 4

Instances


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 23a204d75f91c85bb542269447dbfa2164c695ce
Time: 2018-01-19
Author: max.lapan@gmail.com
File Name: ch13/wob_click_train.py
Class Name:
Method Name:


Project Name: rlworkgroup/garage
Commit Name: 8a5ee1a91d7a25fe57c3cd805bb659246b3efdd4
Time: 2018-05-31
Author: hjzh578@gmail.com
File Name: contrib/ros/envs/sawyer_env.py
Class Name: SawyerEnv
Method Name: _reset_sim


Project Name: oval-group/logger
Commit Name: 6644369db2fe27dad2c0c88388b861aafb1baafd
Time: 2017-11-06
Author: leonardbj@hotmail.fr
File Name: examples/example.py
Class Name:
Method Name:


Project Name: arnomoonens/yarll
Commit Name: 3c312da823d616ef450f7664805fff2dd846bb6a
Time: 2018-07-30
Author: arno.moonens@gmail.com
File Name: agents/sac.py
Class Name: SAC
Method Name: learn


Project Name: flow-project/flow
Commit Name: 75028b69a20261c44081f807a4a18d6d4bcb2929
Time: 2017-02-21
Author: dicksteinleah@gmail.com
File Name: cistar-dev/build-tester.py
Class Name:
Method Name:


Project Name: minerva-ml/open-solution-data-science-bowl-2018
Commit Name: 28ec5687220f562b3bd1b220ed80eded79c54824
Time: 2018-02-09
Author: kamil-kaczmarek@users.noreply.github.com
File Name: steps/pytorch/callbacks.py
Class Name: TrainingMonitor
Method Name: on_epoch_end