CombinedMaskLoss<T>

Models & Types · AiDotNet.ComputerVision.Segmentation.Losses

Combined mask loss using BCE + Dice.

For Beginners

Combining BCE and Dice loss often gives better results than using either alone. BCE provides pixel-level supervision while Dice optimizes the overall mask quality.

Constructors

Constructor Summary
CombinedMaskLoss(double bceWeight, double diceWeight) Creates a combined BCE + Dice loss.

Methods

Method Summary
T Compute(Tensor<T> predicted, Tensor<T> target) Computes combined loss.