Skip to content

Commit 1c68e98

Browse files
committed
Fixed predictions showing as array of False instead of a single True or False
1 parent 615ede9 commit 1c68e98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sagemaker-python-sdk/tensorflow_script_mode_training_and_serving/tensorflow_script_mode_training_and_serving.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@
268268
"source": [
269269
"predictions = predictor.predict(train_data[:50])\n",
270270
"for i in range(0, 50):\n",
271-
" prediction = np.argmax(predictions['predictions'][i])\n",
271+
" prediction = predictions['predictions'][i]['classes']\n",
272272
" label = train_labels[i]\n",
273273
" print('prediction is {}, label is {}, matched: {}'.format(prediction, label, prediction == label))"
274274
]

0 commit comments

Comments
 (0)