My loss function for a DNN classification task is eigenvalue-based which does not need the inputs Y_prediction and Y_actual. Is it possible to write specialized custom loss functions like that using Tensorflow?
CodePudding user response:
Of course:
def customLoss(y_true, y_pred, alpha):
loss = ....alpha
return loss
model.compile(loss=customLoss(alpha), optimizer='sgd')