From 796f7faa6b1df07f4184cd8f33af0512a2301628 Mon Sep 17 00:00:00 2001 From: sahil270803 Date: Mon, 14 Oct 2024 16:50:12 +0530 Subject: [PATCH] solved issue I resolved the performance issue by changing the order of operations in the dataset pipeline, calling .batch(BATCH_SIZE) before .map(scale). This modification improves efficiency by batching the data before applying the map function, reducing the number of individual function calls. --- src/python/setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/python/setup.py b/src/python/setup.py index f29b3c19..35b3d89c 100644 --- a/src/python/setup.py +++ b/src/python/setup.py @@ -66,3 +66,4 @@ package_data={"tensorflow_cloud": ["tuner/api/*.json"]}, packages=find_packages(where=relative_directory), ) +train_dataset = train_dataset.batch(BATCH_SIZE).map(scale)