-
-
Save khuangaf/7b2b3ce14081eed7897294365ee63b13 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Model(object): | |
| def __init__(self, *, policy, ob_space, ac_space, nbatch_act, nbatch_train, | |
| nsteps, ent_coef, vf_coef, max_grad_norm, training): | |
| sess = tf.get_default_session() | |
| if training: | |
| act_model = policy(sess, ob_space, ac_space, nbatch_act, 1, reuse=False) | |
| else: | |
| act_model = policy(sess, ob_space, ac_space, nbatch_act, 1, reuse=True) | |
| train_model = policy(sess, ob_space, ac_space, nbatch_train, nsteps, reuse=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment