(config, eval_ratio)
return dag_pipeline.DAGPipeline(dag)
Returns the Pipeline instance which creates the RNN dataset.

  Args:
    config: A DrumsRnnConfig object.
    eval_ratio: Fraction of input to set aside for evaluation set.

  Returns:
    A pipeline.Pipeline instance.
Returns the Pipeline instance which creates the RNN dataset.
Returns the Pipeline instance which creates the RNN dataset .
def get_pipeline(config, eval_ratio):
  """Returns the Pipeline instance which creates the RNN dataset.

  Args:
    config: A DrumsRnnConfig object.
    eval_ratio: Fraction of input to set aside for evaluation set.

  Returns:
    A pipeline.Pipeline instance.
  """
  partitioner = pipelines_common.RandomPartition(
      note_seq.NoteSequence,
      ['eval_drum_tracks', 'training_drum_tracks'],
      [eval_ratio])
  dag = {partitioner: dag_pipeline.DagInput(note_seq.NoteSequence)}

  for mode in ['eval', 'training']:
    time_change_splitter = note_sequence_pipelines.TimeChangeSplitter(
        name='TimeChangeSplitter_' + mode)
    quantizer = note_sequence_pipelines.Quantizer(
        steps_per_quarter=config.steps_per_quarter, name='Quantizer_' + mode)
    drums_extractor = drum_pipelines.DrumsExtractor(
        min_bars=7, max_steps=512, gap_bars=1.0, name='DrumsExtractor_' + mode)
    encoder_pipeline = event_sequence_pipeline.EncoderPipeline(
        note_seq.DrumTrack,
        config.encoder_decoder,
        name='EncoderPipeline_' + mode)

    dag[time_change_splitter] = partitioner[mode + '_drum_tracks']
    dag[quantizer] = time_change_splitter
    dag[drums_extractor] = quantizer
    dag[encoder_pipeline] = drums_extractor
    dag[dag_pipeline.DagOutput(mode + '_drum_tracks')] = encoder_pipeline

  return dag_pipeline.DAGPipeline(dag)
def get_pipeline ( config , eval_ratio ) : partitioner = pipelines_common . RandomPartition ( note_seq . NoteSequence , [ 'eval_drum_tracks' , 'training_drum_tracks' ] , [ eval_ratio ] ) dag = { partitioner : dag_pipeline . DagInput ( note_seq . NoteSequence ) } for mode in [ 'eval' , 'training' ] : time_change_splitter = note_sequence_pipelines . TimeChangeSplitter ( name = 'TimeChangeSplitter_' + mode ) quantizer = note_sequence_pipelines . Quantizer ( steps_per_quarter = config . steps_per_quarter , name = 'Quantizer_' + mode ) drums_extractor = drum_pipelines . DrumsExtractor ( min_bars = 7 , max_steps = 512 , gap_bars = 1.0 , name = 'DrumsExtractor_' + mode ) encoder_pipeline = event_sequence_pipeline . EncoderPipeline ( note_seq . DrumTrack , config . encoder_decoder , name = 'EncoderPipeline_' + mode ) dag [ time_change_splitter ] = partitioner [ mode + '_drum_tracks' ] dag [ quantizer ] = time_change_splitter dag [ drums_extractor ] = quantizer dag [ encoder_pipeline ] = drums_extractor dag [ dag_pipeline . DagOutput ( mode + '_drum_tracks' ) ] = encoder_pipeline return dag_pipeline . DAGPipeline ( dag )