Submitted by Sadness24_7 t3_z3hwj7 in deeplearning
Hello there,
Im againt facing the issues of not knowing how the metrics and losses are calculated in keras/tensorflow.
I have a custom metric (RMSE) and when training a model with 3 outputs (dense layer) i only get one value. The metric function ( made using the K backend) allows only one output to be calculated at once ( meaning the ground truths and predicted values are vector not array) thus it has to calculate each output separatly, but how it the comes up with a single value ?
​
This is what my model definition looks like.
model = keras.Sequential()
model.add(Input(shape=len(input_keys), ))
model.add(Dense(units=192, activation='tanh'))
model.add(Dropout(.3))
model.add(Dense(units=192, activation='tanh'))
model.add(Dropout(.3))
model.add(Dense(units=64, activation='relu'))
model.add(Dropout(.3))
model.add(Dropout(.3))
model.add(Dense(units=3, activation='linear'))
and compile ...
model.compile(optimizer=opt, loss=loss_fn, metrics=[root_mean_squared_error])
IshanDandekar t1_ixlugz1 wrote
Hi, if you really want to use RMSE as a metric, here's the link RMSE