class_docstr: Module for alignment text and mel spectrogram.
  
  Args:
      n_mel_channels: Dimension of mel spectrogram.
      n_text_channels: Dimension of text embeddings.
      n_att_channels: Dimension of model
      temperature: Temperature to scale distance by.
          Suggested to be 0.0005 when using dist_type "l2" and 15.0 when using "cosine".
      condition_types: List of types for nemo.collections.tts.modules.submodules.ConditionalInput.
      dist_type: Distance type to use for similarity measurement. Supports "l2" and "cosine" distance.
class_docstr_tok: ["Module","for","alignment","text","and","mel","spectrogram",".","Args",":","n_mel_channels",":","Dimension","of","mel","spectrogram",".","n_text_channels",":","Dimension","of","text","embeddings",".","n_att_channels",":","Dimension","of","model","temperature",":","Temperature","to","scale","distance","by",".","Suggested","to","be","0.0005","when","using","dist_type","``","l2","''","and","15.0","when","using","``","cosine","''",".","condition_types",":","List","of","types","for","nemo.collections.tts.modules.submodules.ConditionalInput",".","dist_type",":","Distance","type","to","use","for","similarity","measurement",".","Supports","``","l2","''","and","``","cosine","''","distance","."]
code: def _apply_mask(inputs, mask, mask_value):
      if mask is None:
          return
  
      mask = rearrange(mask, "B T2 1 -> B 1 1 T2")
      inputs.data.masked_fill_(mask, mask_value)
  
file_path: NeMo/nemo/collections/tts/modules/aligner.py
imports: import torch
  from einops import rearrange
  from torch import nn
  from nemo.collections.tts.modules.submodules import ConditionalInput, ConvNorm
  from nemo.collections.tts.parts.utils.helpers import binarize_attention_parallel
label_desc: Use image node_id 2 for calling the AlignmentEncoder obj's underlying member method code with example usage: obj._apply_mask(inputs, mask, mask_value) without return types