class_docstr: An interface to a trained model for encoding, decoding, and sampling.
  
  Attributes:
    config: The Config to build the model graph with.
    batch_size: The batch size to build the model graph with.
    checkpoint_dir_or_path: The directory containing checkpoints for the model,
      the most recent of which will be loaded, or a direct path to a specific
      checkpoint.
    var_name_substitutions: Optional list of string pairs containing regex
      patterns and substitution values for renaming model variables to match
      those in the checkpoint. Useful for backwards compatibility.
    session_target: Optional execution engine to connect to. Defaults to
      in-process.
    sample_kwargs: Additional, non-tensor keyword arguments to pass to sample
      call.
class_docstr_tok: ["An","interface","to","a","trained","model","for","encoding",",","decoding",",","and","sampling",".","Attributes",":","config",":","The","Config","to","build","the","model","graph","with",".","batch_size",":","The","batch","size","to","build","the","model","graph","with",".","checkpoint_dir_or_path",":","The","directory","containing","checkpoints","for","the","model",",","the","most","recent","of","which","will","be","loaded",",","or","a","direct","path","to","a","specific","checkpoint",".","var_name_substitutions",":","Optional","list","of","string","pairs","containing","regex","patterns","and","substitution","values","for","renaming","model","variables","to","match","those","in","the","checkpoint",".","Useful","for","backwards","compatibility",".","session_target",":","Optional","execution","engine","to","connect","to",".","Defaults","to","in-process",".","sample_kwargs",":","Additional",",","non-tensor","keyword","arguments","to","pass","to","sample","call","."]
docstr: Interpolates between a start and an end NoteSequence.
  
  Args:
    start_sequence: The NoteSequence to interpolate from.
    end_sequence: The NoteSequence to interpolate to.
    num_steps: Number of NoteSequences to be generated, including the
      reconstructions of the start and end sequences.
    length: The maximum length of a sample in decoder iterations. Required
      if end tokens are not being used.
    temperature: The softmax temperature to use (if applicable).
    assert_same_length: Whether to raise an AssertionError if all of the
      extracted sequences are not the same length.
  Returns:
    A list of interpolated NoteSequences.
  Raises:
    AssertionError: If `assert_same_length` is True and any extracted
      sequences differ in length.
docstr_tok: ["Interpolates","between","a","start","and","an","end","NoteSequence",".","Args",":","start_sequence",":","The","NoteSequence","to","interpolate","from",".","end_sequence",":","The","NoteSequence","to","interpolate","to",".","num_steps",":","Number","of","NoteSequences","to","be","generated",",","including","the","reconstructions","of","the","start","and","end","sequences",".","length",":","The","maximum","length","of","a","sample","in","decoder","iterations",".","Required","if","end","tokens","are","not","being","used",".","temperature",":","The","softmax","temperature","to","use","(","if","applicable",")",".","assert_same_length",":","Whether","to","raise","an","AssertionError","if","all","of","the","extracted","sequences","are","not","the","same","length",".","Returns",":","A","list","of","interpolated","NoteSequences",".","Raises",":","AssertionError",":","If","`","assert_same_length","`","is","True","and","any","extracted","sequences","differ","in","length","."]
code: def interpolate(
      self,
      start_sequence,
      end_sequence,
      num_steps,
      length=None,
      temperature=1.0,
      assert_same_length=True,
  ):
      """Interpolates between a start and an end NoteSequence.
  
      Args:
        start_sequence: The NoteSequence to interpolate from.
        end_sequence: The NoteSequence to interpolate to.
        num_steps: Number of NoteSequences to be generated, including the
          reconstructions of the start and end sequences.
        length: The maximum length of a sample in decoder iterations. Required
          if end tokens are not being used.
        temperature: The softmax temperature to use (if applicable).
        assert_same_length: Whether to raise an AssertionError if all of the
          extracted sequences are not the same length.
      Returns:
        A list of interpolated NoteSequences.
      Raises:
        AssertionError: If `assert_same_length` is True and any extracted
          sequences differ in length.
      """
  
      def _slerp(p0, p1, t):
          """Spherical linear interpolation."""
          omega = np.arccos(
              np.dot(
                  np.squeeze(p0 / np.linalg.norm(p0)),
                  np.squeeze(p1 / np.linalg.norm(p1)),
              )
          )
          so = np.sin(omega)
          return (
              np.sin((1.0 - t) * omega) / so * p0
              + np.sin(t * omega) / so * p1
          )
  
      _, mu, _ = self.encode(
          [start_sequence, end_sequence], assert_same_length
      )
      z = np.array(
          [
              _slerp(mu[0], mu[1], t)
              for t in np.linspace(0, 1, num_steps)
          ]
      )
      return self.decode(length=length, z=z, temperature=temperature)
  
imports: import copy
  import os
  import re
  import tarfile
  import tempfile
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 7 for calling the TrainedModel obj's underlying member method code with example usage: obj.interpolate(start_sequence, end_sequence, num_steps, length, temperature, assert_same_length) and returns: self, unknown