Hvass-Labs / TensorFlow-Tutorials

TensorFlow Tutorials with YouTube Videos
MIT License
9.28k stars 4.19k forks source link

model.prediction does not match model.evaluation loss error #119

Closed Manal4 closed 4 years ago

Manal4 commented 4 years ago

Hi Thanks for the tutorial. I applied the same code using different data, it worked perfectly, I added the mes, mae metrics in addition to the loss fuction, but when I tried to calculate the individual MSEs, it seems that the error from model.prediction() does not match the error from the model.evaluation(). I just add this line in the comparison function:

                             `  mean_squared_error(signal_true,signal_pred) `

I also divide it by 1000 but the total of mean squared errors from different signals does not match the mse from the model.evaluation(). thanks.

Manal4 commented 4 years ago

I saw @bstriner reply #https://github.com/keras-team/keras/issues/5140#issuecomment-274554133 regarding a similar issue in #https://github.com/keras-team/keras/issues/5140, but I couldn't fix it, it seems to me that shapes/data types are correct.

Hvass-Labs commented 4 years ago

I don't know what you are referring to, but I have just updated many of the tutorials to support TensorFlow 2, so you can try again with the new version.

STEVE-ELF commented 4 years ago

Thanks for your letters.

------------------ 原始邮件 ------------------ 发件人: "Hvass-Labs"<notifications@github.com>; 发送时间: 2020年4月2日(星期四) 晚上8:52 收件人: "Hvass-Labs/TensorFlow-Tutorials"<TensorFlow-Tutorials@noreply.github.com>; 抄送: "Subscribed"<subscribed@noreply.github.com>; 主题: Re: [Hvass-Labs/TensorFlow-Tutorials] model.prediction does not match model.evaluation loss error (#119)

I don't know what you are referring to, but I have just updated many of the tutorials to support TensorFlow 2, so you can try again with the new version.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.