intel-analytics / analytics-zoo

Distributed Tensorflow, Keras and PyTorch on Apache Spark/Flink & Ray
https://analytics-zoo.readthedocs.io/
Apache License 2.0
17 stars 4 forks source link

MAE of bigdl.optim.optimizer and zoo.pipeline.api.keras.objectives are confusing #1135

Open songhappy opened 5 years ago

songhappy commented 5 years ago

MAE of bigdl.optim.optimizer is a validation method, and in zoo.pipeline.api.keras.objectives, mae = MAE = MeanAbsoluteError, then MAE is a criterion. There are a lot of places we do

from zoo.pipeline.api.keras.objectives import *
from bigdl.optim.optimizer import *

then MAE always calls the later one which cause problems.

songhappy commented 5 years ago

fixed by https://github.com/intel-analytics/analytics-zoo/pull/1075

jason-dai commented 5 years ago

Is MAE a metrics or loss in Keras? @zhichao-li

hkvision commented 5 years ago

MAE is a loss in Keras and in BigDL it is also wrapped as a metrics

zhichao-li commented 5 years ago

MAE is not a metrics in Keras 1.2.2, but user can customize a similar one. In Keras 2.x, user can use any loss function as metrics, maybe we can support that later. Theoretically, the forwarding logic is the same only that the interface is not the same in Zoo for now.