Skip to content

Instantly share code, notes, and snippets.

@khuangaf
Last active January 22, 2018 09:46
Show Gist options
  • Select an option

  • Save khuangaf/7b2b3ce14081eed7897294365ee63b13 to your computer and use it in GitHub Desktop.

Select an option

Save khuangaf/7b2b3ce14081eed7897294365ee63b13 to your computer and use it in GitHub Desktop.
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