Add ACER, PPO2, and results_plotter.py

This commit is contained in:
John Schulman
2017-11-16 10:02:32 -08:00
parent 6a3cbb4bc5
commit 2dd7d307d7
19 changed files with 1210 additions and 19 deletions

View File

@@ -238,7 +238,7 @@ def check_shape(ts,shapes):
def avg_norm(t):
return tf.reduce_mean(tf.sqrt(tf.reduce_sum(tf.square(t), axis=-1)))
def myadd(g1, g2, param):
def gradient_add(g1, g2, param):
print([g1, g2, param.name])
assert (not (g1 is None and g2 is None)), param.name
if g1 is None:
@@ -248,7 +248,7 @@ def myadd(g1, g2, param):
else:
return g1 + g2
def my_explained_variance(qpred, q):
def q_explained_variance(qpred, q):
_, vary = tf.nn.moments(q, axes=[0, 1])
_, varpred = tf.nn.moments(q - qpred, axes=[0, 1])
check_shape([vary, varpred], [[]] * 2)