code: def forward(
      self,
      spec_masks,
      decoder_outputs,
      targets,
      decoder_lengths=None,
      target_lengths=None,
  ):
      # outputs are log_probs
      masks = spec_masks.transpose(-2, -1)
      # BxTxC
  
      masks = masks.reshape(
          masks.shape[0], masks.shape[1] // self.combine_time_steps, -1
      )
      masks = masks.mean(-1) > self.mask_threshold
  
      out_masked_only = decoder_outputs[masks]
      targets = F.pad(targets, (0, masks.shape[-1] - targets.shape[-1]))
      targets_masked_only = targets[masks]
  
      loss = self.nll_loss(out_masked_only, targets_masked_only)
      loss = torch.mean(loss)
  
      return loss
  
file_path: NeMo/nemo/collections/asr/losses/ssl_losses/mlm.py
imports: import torch
  import torch.nn.functional
  from torch import nn
  from nemo.core import Loss, typecheck
  from nemo.core.neural_types import LabelsType, LengthsType, LogprobsType, LossType, NeuralType, SpectrogramType
label_desc: Use image node_id 5 for calling the MLMLoss obj's underlying member method code with example usage: obj.forward(spec_masks, decoder_outputs, targets, decoder_lengths, target_lengths) and returns: loss