def testPerformanceRnnPipeline(self):
        note_sequence = music_pb2.NoteSequence()
        magenta.music.testing_lib.add_track_to_sequence(
            note_sequence, 0, [(36, 100, 0.00, 2.0), (40, 55, 2.1, 5.0),
                               (44, 80, 3.6, 5.0), (41, 45, 5.1, 8.0),
                               (64, 100, 6.6, 10.0), (55, 120, 8.1, 11.0),
                               (39, 110, 9.6, 9.7), (53, 99, 11.1, 14.1),
                               (51, 40, 12.6, 13.0), (55, 100, 14.1, 15.0),
                               (54, 90, 15.6, 17.0), (60, 100, 17.1, 18.0)])

        pipeline_inst = performance_rnn_pipeline.get_pipeline(
            min_events=32, max_events=512, eval_ratio=0, config=self.config)
        result = pipeline_inst.transform(note_sequence)
        self.assertTrue(len(result['training_performances']))
def main(unused_argv):
  tf.logging.set_verbosity(FLAGS.log)

  pipeline_instance = performance_rnn_pipeline.get_pipeline(
      min_events=32,
      max_events=512,
      eval_ratio=FLAGS.eval_ratio,
      config=performance_model.default_configs[FLAGS.config])

  input_dir = os.path.expanduser(FLAGS.input)
  output_dir = os.path.expanduser(FLAGS.output_dir)
  pipeline.run_pipeline_serial(
      pipeline_instance,
      pipeline.tf_record_iterator(input_dir, pipeline_instance.input_type),
      output_dir)
def main(unused_argv):
    tf.logging.set_verbosity(FLAGS.log)

    pipeline_instance = performance_rnn_pipeline.get_pipeline(
        min_events=32,
        max_events=512,
        eval_ratio=FLAGS.eval_ratio,
        config=performance_model.default_configs[FLAGS.config])

    input_dir = os.path.expanduser(FLAGS.input)
    output_dir = os.path.expanduser(FLAGS.output_dir)
    pipeline.run_pipeline_serial(
        pipeline_instance,
        pipeline.tf_record_iterator(input_dir, pipeline_instance.input_type),
        output_dir)
  def testPerformanceRnnPipeline(self):
    note_sequence = music_pb2.NoteSequence()
    magenta.music.testing_lib.add_track_to_sequence(
        note_sequence, 0,
        [(36, 100, 0.00, 2.0), (40, 55, 2.1, 5.0), (44, 80, 3.6, 5.0),
         (41, 45, 5.1, 8.0), (64, 100, 6.6, 10.0), (55, 120, 8.1, 11.0),
         (39, 110, 9.6, 9.7), (53, 99, 11.1, 14.1), (51, 40, 12.6, 13.0),
         (55, 100, 14.1, 15.0), (54, 90, 15.6, 17.0), (60, 100, 17.1, 18.0)])

    pipeline_inst = performance_rnn_pipeline.get_pipeline(
        min_events=32,
        max_events=512,
        eval_ratio=0,
        config=self.config)
    result = pipeline_inst.transform(note_sequence)
    self.assertTrue(len(result['training_performances']))