From c285e4960530ad5d9bd247e38de2e57705fed7f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Furkan=20=C3=9Cnl=C3=BCt=C3=BCrk?= Date: Sat, 21 May 2022 15:58:50 +0300 Subject: [PATCH] fix deprecated Sequential.predict_classes https://stackoverflow.com/questions/68836551/keras-attributeerror-sequential-object-has-no-attribute-predict-classes --- CNN_Fashion_MNIST_Example.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CNN_Fashion_MNIST_Example.ipynb b/CNN_Fashion_MNIST_Example.ipynb index 831c92c..0130c6f 100644 --- a/CNN_Fashion_MNIST_Example.ipynb +++ b/CNN_Fashion_MNIST_Example.ipynb @@ -541,7 +541,7 @@ }, "source": [ "# Get Model Predictions for test data\n", - "predicted_classes = model.predict_classes(x_test)\n", + "predicted_classes = np.argmax(model.predict(x_test), axis=1)\n", "print(classification_report(y_test, predicted_classes, target_names=class_names))" ], "execution_count": 8, @@ -691,4 +691,4 @@ ] } ] -} \ No newline at end of file +}