I came across a problem with comparing the predictions of my model with the labels of training set. The arrays I'm using have shapes:
Training set (200000, 28, 28) (200000,)
Validation set (10000, 28, 28) (10000,)
Test set (10000, 28, 28) (10000,)
However, when checking the accuracy with the function:
def accuracy(predictions, labels):
return (100.0 * np.sum(np.argmax(predictions, 1) == np.argmax(labels, 1))
/ predictions.shape[0])
It's giving me:
C:\Users\Arslan\Anaconda3\lib\site-packages\ipykernel_launcher.py:5: DeprecationWarning: elementwise == comparison failed; this will raise an error in the future. """
And it gives the accuracy as 0% for all datasets.
I think we cannot compare the arrays using '=='. How could I compare the arrays in the right way instead?