src/transformers/models/tvlt/modeling_tvlt.py/TvltForPreTraining/pixel_mae_loss
class TvltForPreTraining:    def pixel_mae_loss(self, pixel_values, pixel_predictions, mask):
        patchified_pixel_values = self.patchify_pixel(pixel_values)
        loss = (pixel_predictions - patchified_pixel_values) ** 2
        loss = loss.mean(dim=-1)  # [batch_size, pixel_pixel_length], mean loss per patch
        loss = (loss * mask).sum() / mask.sum()  # mean loss on removed patches
        return loss