HI.
Given a dataset valid_ds:
<PrefetchDataset shapes: ((None, 10, 224, 224, 3), (None, 5)), types: (tf.float32, tf.float32)>
I evaluate my model like this:
mse, mae = model.evaluate(valid_ds)
mao
It gives:
mae=0.9110
if i extracted the y_true from valid_ds like this:
y_true = np.concatenate([y, for x,y in valid_ds], axis=0)
Then i used mean_absolute_error from sklearn.metrics:
y_valid_pred = model.predict(valid_ds)
mae = mean_absolute_error(y_true, y_valid_pred)
I got a mae:
mae=0.8534
Can someone tell me why we have different values of mae?
Thank you