Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Keras / Cloud TPU]: Correct indexing for software pipelining. #22114

Merged
merged 1 commit into from
Sep 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion tensorflow/contrib/tpu/python/tpu/keras_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -1619,7 +1619,7 @@ def _pipeline_fit_loop_step_wise(self,
'make sure your paths are correct and you have '
'permissions to read the files. Skipping validation')

for step_index in range(steps_per_epoch - 1):
for step_index in range(steps_per_epoch):
batch_logs = {'batch': step_index, 'size': 1}
callbacks.on_batch_begin(step_index, batch_logs)
try:
Expand Down
2 changes: 0 additions & 2 deletions tensorflow/contrib/tpu/python/tpu/keras_tpu_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.ops import gen_resource_variable_ops
from tensorflow.python.ops import variable_scope
from tensorflow.python.platform import tf_logging as logging


@contextlib.contextmanager
Expand Down Expand Up @@ -258,7 +257,6 @@ def _replicated_variable_getter(getter, name, *args, **kwargs):
collections = [ops.GraphKeys.GLOBAL_VARIABLES]
kwargs["collections"] = []

logging.info("Constructing replicated variable %s", name)
variables = []
index = {}
for i in range(num_replicas):
Expand Down