Customizing loss function to mask part of the groundtruth

Greetings,

My goal is to customize the loss funtion of an AFNO so that the loss function calculates the loss only in the unmasked pixels (mask constant in all of the examples). Currently using a loss aggregator of sum. Is it possible to customize accordingly? Is there an example of that?

Hello,

This section is for Modulus users and customers to post stories on how they’ve used Modulus Physics-ML Model Framework.

For technical issues, please post in the appropriate forum.

Tom