credit.postblock.wet_mask_samudra

credit.postblock.wet_mask_samudra#

Classes#

WetMaskBlock

Post-processing layer that applies wet mask to ocean predictions.

Module Contents#

class credit.postblock.wet_mask_samudra.WetMaskBlock(conf, key: str = 'prediction')#

Bases: torch.nn.Module

Post-processing layer that applies wet mask to ocean predictions. Zero trainable parameters, but mask influences gradients.

Masks predictions so land points = 0, ocean points preserve values. This encourages the model to focus learning on ocean regions.

key = 'prediction'#
forward(batch_dict: dict) dict#

Apply wet mask to batch_dict[self.key] (land=0, ocean preserved).