Skip to content

Commit

Permalink
padding
Browse files Browse the repository at this point in the history
  • Loading branch information
priyakasimbeg committed Sep 29, 2023
1 parent 6fdc23a commit b7b94a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions algorithmic_efficiency/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def shard_and_maybe_pad_np(
remainder_size = current_batch_size % local_device_count
# if pad_to_global_batch_size:
if remainder_size != 0:
logging.info("PADDDINGGGGGGG")
if global_batch_size is not None:
pad_size = global_batch_size - current_batch_size
else:
Expand All @@ -62,6 +63,7 @@ def _prepare(x):
# Pad if remainder_size != 0 (should only be possible during evaluation).
# if pad_to_global_batch_size:
if remainder_size != 0:
logging.info("PADDDINGGGGGG in _prepare")
x = pad(x, pad_size, padding_value=padding_value)

# Reshape (global_batch_size, ...) to
Expand Down

0 comments on commit b7b94a2

Please sign in to comment.