Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Writing custom loss in tensorflow that does not use Y_pred and Y_actual

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?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Of course:

def customLoss(y_true, y_pred, alpha):
               loss = ....alpha
                return loss
model.compile(loss=customLoss(alpha), optimizer='sgd')
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading