class_docstr: Parameterize impulse response with outputs of a filtered noise synth.
class_docstr_tok: ["Parameterize","impulse","response","with","outputs","of","a","filtered","noise","synth","."]
docstr: Convert network outputs into ir response.
  
  Args:
    audio: Dry audio. 2-D Tensor of shape [batch, n_samples].
    magnitudes: Magnitudes tensor of shape [batch, n_frames, n_filter_banks].
      Expects float32 that is strictly positive. Not used if trainable=True.
  
  Returns:
    controls: Dictionary of effect controls.
  
  Raises:
    ValueError: If trainable=False and magnitudes are not provided.
docstr_tok: ["Convert","network","outputs","into","ir","response",".","Args",":","audio",":","Dry","audio",".","2-D","Tensor","of","shape","[","batch",",","n_samples","]",".","magnitudes",":","Magnitudes","tensor","of","shape","[","batch",",","n_frames",",","n_filter_banks","]",".","Expects","float32","that","is","strictly","positive",".","Not","used","if","trainable=True",".","Returns",":","controls",":","Dictionary","of","effect","controls",".","Raises",":","ValueError",":","If","trainable=False","and","magnitudes","are","not","provided","."]
code: def get_controls(self, audio, magnitudes=None):
      """Convert network outputs into ir response.
  
      Args:
        audio: Dry audio. 2-D Tensor of shape [batch, n_samples].
        magnitudes: Magnitudes tensor of shape [batch, n_frames, n_filter_banks].
          Expects float32 that is strictly positive. Not used if trainable=True.
  
      Returns:
        controls: Dictionary of effect controls.
  
      Raises:
        ValueError: If trainable=False and magnitudes are not provided.
      """
      if self.trainable:
          magnitudes = self._magnitudes[tf.newaxis, :]
      else:
          if magnitudes is None:
              raise ValueError(
                  'Must provide "magnitudes" tensor if '
                  "FilteredNoiseReverb trainable=False."
              )
  
      ir = self._synth(magnitudes)
  
      if self.trainable:
          ir = self._match_dimensions(audio, ir)
  
      return {"audio": audio, "ir": ir}
  
imports: from ddsp import core
  from ddsp import processors
  from ddsp import synths
  import gin
  import tensorflow.compat.v2
label_desc: Use image node_id 3 for calling the FilteredNoiseReverb obj's underlying member method code with example usage: obj.get_controls(audio, magnitudes) and returns: dict