class_docstr: Constant-power crossfade between two signals.
class_docstr_tok: ["Constant-power","crossfade","between","two","signals","."]
docstr: Standardize inputs to same length, mix_level to range [0, 1].
  
  Args:
    signal_one: 2-D or 3-D tensor.
    signal_two: 2-D or 3-D tensor.
    nn_out_mix_level: Tensor of shape [batch, n_time, 1] output of the network
      determining relative levels of signal one and two.
  
  Returns:
    Dict of control parameters.
  
  Raises:
    ValueError: If signal_one and signal_two are not the same length.
docstr_tok: ["Standardize","inputs","to","same","length",",","mix_level","to","range","[","0",",","1","]",".","Args",":","signal_one",":","2-D","or","3-D","tensor",".","signal_two",":","2-D","or","3-D","tensor",".","nn_out_mix_level",":","Tensor","of","shape","[","batch",",","n_time",",","1","]","output","of","the","network","determining","relative","levels","of","signal","one","and","two",".","Returns",":","Dict","of","control","parameters",".","Raises",":","ValueError",":","If","signal_one","and","signal_two","are","not","the","same","length","."]
code: def get_controls(
      self,
      signal_one: tf.Tensor,
      signal_two: tf.Tensor,
      nn_out_mix_level: tf.Tensor,
  ) -> TensorDict:
      """Standardize inputs to same length, mix_level to range [0, 1].
  
      Args:
        signal_one: 2-D or 3-D tensor.
        signal_two: 2-D or 3-D tensor.
        nn_out_mix_level: Tensor of shape [batch, n_time, 1] output of the network
          determining relative levels of signal one and two.
  
      Returns:
        Dict of control parameters.
  
      Raises:
        ValueError: If signal_one and signal_two are not the same length.
      """
      n_time_one = int(signal_one.shape[1])
      n_time_two = int(signal_two.shape[1])
      if n_time_one != n_time_two:
          raise ValueError(
              "The two signals must have the same length instead of"
              "{} and {}".format(n_time_one, n_time_two)
          )
  
      mix_level = tf.nn.sigmoid(nn_out_mix_level)
      mix_level = core.resample(mix_level, n_time_one)
      return {
          "signal_one": signal_one,
          "signal_two": signal_two,
          "mix_level": mix_level,
      }
  
imports: from typing import Dict, Text
  from ddsp import core
  from ddsp import dags
  import gin
  import tensorflow
label_desc: Use image node_id 2 for calling the Mix obj's underlying member method code with example usage: obj.get_controls(signal_one, signal_two, nn_out_mix_level) and returns: dict