class_docstr: Stretch2d module.
class_docstr_tok: ["Stretch2d","module","."]
docstr: Initialize Stretch2d module.
  
  Args:
      x_scale (int): X scaling factor (Time axis in spectrogram).
      y_scale (int): Y scaling factor (Frequency axis in spectrogram).
      mode (str): Interpolation mode.
docstr_tok: ["Initialize","Stretch2d","module",".","Args",":","x_scale","(","int",")",":","X","scaling","factor","(","Time","axis","in","spectrogram",")",".","y_scale","(","int",")",":","Y","scaling","factor","(","Frequency","axis","in","spectrogram",")",".","mode","(","str",")",":","Interpolation","mode","."]
code: def __init__(self, x_scale: int, y_scale: int, mode: str = "nearest"):
      """Initialize Stretch2d module.
  
      Args:
          x_scale (int): X scaling factor (Time axis in spectrogram).
          y_scale (int): Y scaling factor (Frequency axis in spectrogram).
          mode (str): Interpolation mode.
  
      """
      super().__init__()
      self.x_scale = x_scale
      self.y_scale = y_scale
      self.mode = mode
  
imports: from typing import Any, Dict, List, Optional
  import numpy
  import torch
  import torch.nn.functional
  from espnet2.gan_tts.wavenet.residual_block import Conv1d
label_desc: Use image node_id 1 to create a new Stretch2d object from inherited base classes: torch.nn with example: obj = Stretch2d(x_scale, y_scale, mode)