Skip to content

Commit

Permalink
chore: removing cache to off load the ram
Browse files Browse the repository at this point in the history
  • Loading branch information
ariG23498 committed Jun 20, 2023
1 parent 3c6f4c8 commit 1059373
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/vision/oxford_pets_image_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ def unpackage_inputs(inputs):
"""

augmented_train_ds = (
train_ds.cache()
train_ds
.shuffle(BATCH_SIZE * 2)
.map(augment_fn, num_parallel_calls=AUTOTUNE)
.batch(BATCH_SIZE)
.map(unpackage_inputs)
.prefetch(buffer_size=tf.data.AUTOTUNE)
)
resized_val_ds = (
val_ds.cache()
val_ds
.map(resize_fn, num_parallel_calls=AUTOTUNE)
.batch(BATCH_SIZE)
.map(unpackage_inputs)
Expand Down

0 comments on commit 1059373

Please sign in to comment.