16a31e2c9fedc654e9117b42b8144adf1d0e4900,examples/reinforcement_learning/tutorial_A3C.py,,,#,259

Before Change


        plt.xlabel("episode")
        plt.ylabel("global running reward")
        plt.savefig("a3c.png")
        plt.show()

        GLOBAL_AC.save_ckpt()

    if args.test:

After Change


    if args.test:
        // ============================= EVALUATION =============================
        GLOBAL_AC.load()
        for episode in range(TEST_EPISODES):
            s = env.reset()
            episode_reward = 0
            while True:
                env.render()
                s = s.astype("float32")  // double to float
                a = GLOBAL_AC.get_action(s, greedy=True)
                s, r, d, _ = env.step(a)
                episode_reward += r
                if d:
                    break
            print(
                "Testing  | Episode: {}/{}  | Episode Reward: {:.4f}  | Running Time: {:.4f}".format(
                    episode + 1, TEST_EPISODES, episode_reward,
                    time.time() - T0))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: tensorlayer/tensorlayer
Commit Name: 16a31e2c9fedc654e9117b42b8144adf1d0e4900
Time: 2020-02-03
Author: 34995488+Tokarev-TT-33@users.noreply.github.com
File Name: examples/reinforcement_learning/tutorial_A3C.py
Class Name:
Method Name:


Project Name: ilastik/ilastik
Commit Name: db00d263dd7b3079d9fe42af721828cce7fc0f24
Time: 2018-12-20
Author: hiltpa@gmail.com
File Name: ilastik/applets/objectClassification/objectClassificationGui.py
Class Name: ObjectClassificationGui
Method Name: setupLayers


Project Name: ilastik/ilastik
Commit Name: db00d263dd7b3079d9fe42af721828cce7fc0f24
Time: 2018-12-20
Author: hiltpa@gmail.com
File Name: ilastik/applets/pixelClassification/pixelClassificationGui.py
Class Name: PixelClassificationGui
Method Name: setupLayers