what is the loss function of pre-trained EfficientNet-B0
10 views (last 30 days)
Show older comments
For validation, we trained CNN models using the pre-trained EfficientNet-B0 with 'deepNetDesigner -v1'. However, the code only shows 'Loss' without specifying which loss function is being used. If no loss function is explicitly set, which one is applied by default?
1 Comment
Haelee
on 24 Mar 2025
I believe the loss function is configured when we train the model. I assume you might have used "trainnet" function after loading the pre-trained EfficientNet-B0 model, and the function receives the Loss Function as its parameter. If you've applied a different workflow, please give us more information about that.
Answers (1)
Jayanti
on 22 Aug 2025
Hi Hyeokjun,
Since loss function is to be configured while training. I assume you have exported the code and are training the network using "trainNetwork". In this workflow, since the loss function is not specified manually it should be determined by the type of the final layer in the network.
- If the network ends with a classification layer, it uses cross-entropy loss.
- If the network ends with a regression layer, it uses mean squared error (MSE).
Since EfficientNet-B0 is a classification model, the loss should be cross-entropy loss.
0 Comments
See Also
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!