Skip to content

Commit 0ff58ac

Browse files
blazejosinskikpe
authored andcommitted
Merge of PR tensorflow#1443
PiperOrigin-RevId: 233087778
1 parent 8d7786a commit 0ff58ac

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tensor2tensor/rl/ppo_learner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def initialization_lambda(sess):
351351
batch_env.initialize(sess)
352352

353353
memory = [
354-
tf.get_variable(
354+
tf.get_variable( # pylint: disable=g-complex-comprehension
355355
"collect_memory_%d_%s" % (epoch_length, name),
356356
shape=[epoch_length] + shape,
357357
dtype=dtype,

tensor2tensor/rl/trainer_model_free.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ def initialize_env_specs(hparams):
6262

6363
return rl.make_real_env_fn(env)
6464

65+
6566
step = 0
6667

68+
6769
def train(hparams, output_dir, report_fn=None):
6870
"""Train."""
6971
env_fn = initialize_env_specs(hparams)
@@ -127,6 +129,7 @@ def evaluate_on_new_model(model_dir_path):
127129
epoch=0,
128130
model_save_fn=evaluate_on_new_model)
129131

132+
130133
def main(_):
131134
hparams = trainer_lib.create_hparams(FLAGS.hparams_set, FLAGS.hparams)
132135

0 commit comments

Comments
 (0)