Skip to content

Commit 6bf16bf

Browse files
authored
Update reproducibility_recipes.py
1 parent 773263c commit 6bf16bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/keras_recipes/reproducibility_recipes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,10 @@ def train_model(train_data: tf.data.Dataset, test_data: tf.data.Dataset) -> dict
151151
)
152152

153153
model.compile(
154-
optimizer="adam", loss="sparse_categorical_crossentropy", metrics=["accuracy"]
154+
optimizer="adam", loss="sparse_categorical_crossentropy", metrics=["accuracy"], jit_compile = False
155155
)
156+
# jit_compile's default value is "auto" which will cause some problems in some
157+
# ops, therefore it's set to False.
156158

157159
# model.fit has a `shuffle` parameter which has a default value of `True`.
158160
# If you are using array-like objects, this will shuffle the data before

0 commit comments

Comments
 (0)