Skip to content

Commit 7cc1278

Browse files
authored
Merge pull request aws#355 from awslabs/mkl-patch
Disable MKL for TensorFlow iris example to get a better performance.
2 parents c2f2d95 + d88d1c1 commit 7cc1278

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

sagemaker-python-sdk/tensorflow_iris_dnn_classifier_using_estimators/iris_dnn_classifier.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
INPUT_TENSOR_NAME = 'inputs'
66

7+
# Disable MKL to get a better perfomance for this model.
8+
os.environ['TF_DISABLE_MKL'] = '1'
9+
os.environ['TF_DISABLE_POOL_ALLOCATOR'] = '1'
10+
711

812
def estimator_fn(run_config, params):
913
feature_columns = [tf.feature_column.numeric_column(INPUT_TENSOR_NAME, shape=[4])]

sagemaker-python-sdk/tensorflow_iris_dnn_classifier_using_estimators/tensorflow_iris_dnn_classifier_using_estimators.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@
300300
"\n",
301301
"iris_estimator = TensorFlow(entry_point='iris_dnn_classifier.py',\n",
302302
" role=role,\n",
303+
" framework_version='1.8',\n",
303304
" output_path=model_artifacts_location,\n",
304305
" code_location=custom_code_upload_location,\n",
305306
" train_instance_count=1,\n",

0 commit comments

Comments
 (0)