Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit defd57e

Browse files
koz4kCopybara-Service
authored andcommitted
internal merge of PR #1190
PiperOrigin-RevId: 219710898
1 parent 80062bb commit defd57e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tensor2tensor/layers/modalities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def top(self, body_output, _):
143143

144144
if self._model_hparams.shared_embedding_and_softmax_weights:
145145
scope_name = "shared"
146-
reuse = tf.AUTO_REUSE
146+
reuse = True
147147
else:
148148
scope_name = "softmax"
149149
reuse = False

tensor2tensor/rl/trainer_model_based.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def world_model_step_increment(hparams, is_initial_epoch):
8383

8484

8585
def setup_directories(base_dir, subdirs):
86+
"""Setup directories."""
8687
base_dir = os.path.expanduser(base_dir)
8788
tf.gfile.MakeDirs(base_dir)
8889

@@ -423,7 +424,7 @@ def initial_frame_chooser(batch_size):
423424
def decode_real_obs(index):
424425
return np.stack([
425426
subsequence[index].observation.decode()
426-
for subsequence in eval_subsequences
427+
for subsequence in eval_subsequences # pylint: disable=cell-var-from-loop
427428
])
428429
real_init_obs = decode_real_obs(0)
429430
assert np.all(sim_init_obs == real_init_obs)

0 commit comments

Comments
 (0)