Modify Loss Function in Predefined Network

9 vues (au cours des 30 derniers jours)
Tony
Tony le 8 Oct 2019
Hi All--I'm relatively new to deep learning and have been trying to use a large data set to predict cardiovascular disease between healthy/sick subjects. I have been trying to train existing networks (AlexNet, etc.). The issue is that my control data vs sick data is about 80%/20% split, so I would like to penalize the loss function for calling a sick patient not sick. This is where I am stuck. Here is my last layer:
lgraph.Layers(25)
ans =
ClassificationOutputLayer with properties:
Name: 'new_classoutput'
Classes: 'auto'
OutputSize: 'auto'
Hyperparameters
LossFunction: 'crossentropyex'
How do I modify the loss function within this layer? Thanks a bunch!

Réponse acceptée

Harsha Priya Daggubati
Harsha Priya Daggubati le 11 Oct 2019
Hi,
You can try creating your custom loss function. Refer to the following link:

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with Statistics and Machine Learning Toolbox dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by