class_docstr: The Brain implementation for Tacotron2
class_docstr_tok: ["The","Brain","implementation","for","Tacotron2"]
docstr: Converts a raw spectrogram to one that can be saved as an image
  sample  = sqrt(exp(raw))
  
  Arguments
  ---------
  raw: torch.Tensor
      the raw spectrogram (as used in the model)
  
  Returns
  -------
  sample: torch.Tensor
      the spectrogram, for image saving purposes
docstr_tok: ["Converts","a","raw","spectrogram","to","one","that","can","be","saved","as","an","image","sample","=","sqrt","(","exp","(","raw",")",")","Arguments","--","--","--","--","-","raw",":","torch.Tensor","the","raw","spectrogram","(","as","used","in","the","model",")","Returns","--","--","--","-","sample",":","torch.Tensor","the","spectrogram",",","for","image","saving","purposes"]
code: def _get_spectrogram_sample(self, raw):
      """Converts a raw spectrogram to one that can be saved as an image
      sample  = sqrt(exp(raw))
  
      Arguments
      ---------
      raw: torch.Tensor
          the raw spectrogram (as used in the model)
  
      Returns
      -------
      sample: torch.Tensor
          the spectrogram, for image saving purposes
      """
      sample = raw[0]
      return torch.sqrt(torch.exp(sample))
  
file_path: speechbrain/recipes/LJSpeech/TTS/tacotron2/train.py
imports: import torch
  import speechbrain
  import sys
  import logging
  from hyperpyyaml import load_hyperpyyaml
  from speechbrain.utils.text_to_sequence import text_to_sequence
  from speechbrain.utils.data_utils import scalarize
label_desc: Use image node_id 8 for calling the Tacotron2Brain obj's underlying member method code with example usage: obj._get_spectrogram_sample(raw) and returns: torch