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

  Args:
    config: An EventSequenceRnnConfig.
    min_steps: Minimum number of steps for an extracted sequence.
    max_steps: Maximum number of steps for an extracted sequence.
    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, min_steps, max_steps, eval_ratio):
  """Returns the Pipeline instance which creates the RNN dataset.

  Args:
    config: An EventSequenceRnnConfig.
    min_steps: Minimum number of steps for an extracted sequence.
    max_steps: Maximum number of steps for an extracted sequence.
    eval_ratio: Fraction of input to set aside for evaluation set.

  Returns:
    A pipeline.Pipeline instance.
  """
  # Transpose up to a major third in either direction.
  transposition_range = list(range(-4, 5))

  partitioner = pipelines_common.RandomPartition(
      music_pb2.NoteSequence,
      ['eval_pianoroll_tracks', 'training_pianoroll_tracks'],
      [eval_ratio])
  dag = {partitioner: dag_pipeline.DagInput(music_pb2.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)
    transposition_pipeline = note_sequence_pipelines.TranspositionPipeline(
        transposition_range, name='TranspositionPipeline_' + mode)
    pianoroll_extractor = PianorollSequenceExtractor(
        min_steps=min_steps, max_steps=max_steps,
        name='PianorollExtractor_' + mode)
    encoder_pipeline = event_sequence_pipeline.EncoderPipeline(
        PianorollSequence,
        config.encoder_decoder,
        name='EncoderPipeline_' + mode)

    dag[time_change_splitter] = partitioner[mode + '_pianoroll_tracks']
    dag[quantizer] = time_change_splitter
    dag[transposition_pipeline] = quantizer
    dag[pianoroll_extractor] = transposition_pipeline
    dag[encoder_pipeline] = pianoroll_extractor
    dag[dag_pipeline.DagOutput(mode + '_pianoroll_tracks')] = encoder_pipeline

  return dag_pipeline.DAGPipeline(dag)
def get_pipeline ( config , min_steps , max_steps , eval_ratio ) : # Transpose up to a major third in either direction. transposition_range = list ( range ( - 4 , 5 ) ) partitioner = pipelines_common . RandomPartition ( music_pb2 . NoteSequence , [ 'eval_pianoroll_tracks' , 'training_pianoroll_tracks' ] , [ eval_ratio ] ) dag = { partitioner : dag_pipeline . DagInput ( music_pb2 . 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 ) transposition_pipeline = note_sequence_pipelines . TranspositionPipeline ( transposition_range , name = 'TranspositionPipeline_' + mode ) pianoroll_extractor = PianorollSequenceExtractor ( min_steps = min_steps , max_steps = max_steps , name = 'PianorollExtractor_' + mode ) encoder_pipeline = event_sequence_pipeline . EncoderPipeline ( PianorollSequence , config . encoder_decoder , name = 'EncoderPipeline_' + mode ) dag [ time_change_splitter ] = partitioner [ mode + '_pianoroll_tracks' ] dag [ quantizer ] = time_change_splitter dag [ transposition_pipeline ] = quantizer dag [ pianoroll_extractor ] = transposition_pipeline dag [ encoder_pipeline ] = pianoroll_extractor dag [ dag_pipeline . DagOutput ( mode + '_pianoroll_tracks' ) ] = encoder_pipeline return dag_pipeline . DAGPipeline ( dag )