class_docstr: Progressive GAN model for a specific stage and batch_size.
class_docstr_tok: ["Progressive","GAN","model","for","a","specific","stage","and","batch_size","."]
docstr: Generate random latent fake samples.
  
  If pitch is not specified, pitches will be sampled randomly.
  
  Args:
    n_samples: Number of samples to generate.
    pitch: List of pitches to generate.
    max_audio_length: Trim generation to <= this length.
  
  Returns:
    An array of audio for the notes [n_notes, n_audio_samples].
docstr_tok: ["Generate","random","latent","fake","samples",".","If","pitch","is","not","specified",",","pitches","will","be","sampled","randomly",".","Args",":","n_samples",":","Number","of","samples","to","generate",".","pitch",":","List","of","pitches","to","generate",".","max_audio_length",":","Trim","generation","to","<","=","this","length",".","Returns",":","An","array","of","audio","for","the","notes","[","n_notes",",","n_audio_samples","]","."]
code: def generate_samples(
      self, n_samples, pitch=None, max_audio_length=64000
  ):
      """Generate random latent fake samples.
  
      If pitch is not specified, pitches will be sampled randomly.
  
      Args:
        n_samples: Number of samples to generate.
        pitch: List of pitches to generate.
        max_audio_length: Trim generation to <= this length.
  
      Returns:
        An array of audio for the notes [n_notes, n_audio_samples].
      """
      # Create list of pitches to generate
      if pitch is not None:
          pitches = [pitch] * n_samples
      else:
          all_pitches = []
          for k, v in self.pitch_counts.items():
              all_pitches.extend([k] * v)
          pitches = np.random.choice(all_pitches, n_samples)
      z = self.generate_z(len(pitches))
      return self.generate_samples_from_z(z, pitches, max_audio_length)
  
imports: import json
  import os
  import time
  from magenta.models.gansynth.lib import data_helpers
  from magenta.models.gansynth.lib import flags
  from magenta.models.gansynth.lib import network_functions
  from magenta.models.gansynth.lib import networks
  from magenta.models.gansynth.lib import train_util
  from magenta.models.gansynth.lib import util
  import numpy
  import tensorflow.compat.v1
  import tensorflow_gan
label_desc: Use image node_id 6 for calling the Model obj's underlying member method code with example usage: obj.generate_samples(n_samples, pitch, max_audio_length) and returns: self