How to change the default loss function from "crossentropyex" to "crossentropy" using the pixelClassificationLayer in MATLAB?
Show older comments
Hi,
The properties of the pixelClassificationLayer include the LossFunction "crossentropyex" by default. When I attempted to change it as shown below:
SegLayer = pixelClassificationLayer('LossFunction', 'crossentropy');
I encountered the following error:
Error using nnet.cnn.layer.PixelClassificationLayer.parseInputs 'LossFunction' is not a recognized parameter.
Could you please demonstrate how to modify the default loss function? I am using the Unet model for semantic segmentation, and I want to switch from "crossentropyex" to "crossentropy" because the former is only suitable for mutually exclusive scenarios.
Thank you!
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB Mobile 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!