我正在使用深度学习方法来解决具有多输出(16 个输出)的回归问题,每个输出介于[0,1]和总和为1之间。我对哪种损失函数最适合这个问题感到困惑,我已经测试了均方误差和平均绝对误差,但神经网络预测的值总是相同的。
model = applications.VGG16(include_top=False, weights = None, input_shape = (256, 256, 3))
x = model.output
x = Flatten()(x)
x = Dense(1024)(x)
x=BatchNormalization()(x)
x = Activation("relu")(x)
x = Dropout(0.5)(x)
x = Dense(512)(x)
x=BatchNormalization()(x)
x = Activation("relu")(x)
x = Dropout(0.5)(x)
predictions = Dense(16,activation="sigmoid")(x)
model_final = Model(input = model.input, output = predictions)
model_final.compile(loss ='mse', optimizer = Adam(lr=0.1), metrics=['mae'])