- class mmpretrain.models.losses.PixelReconstructionLoss(criterion, channel=None)¶
Loss for the reconstruction of pixel in Masked Image Modeling.
This module measures the distance between the target image and the reconstructed image and compute the loss to optimize the model. Currently, This module only provides L1 and L2 loss to penalize the reconstructed error. In addition, a mask can be passed in the
forwardfunction to only apply loss on visible region, like that in MAE.