Building Dataset

150 views
Skip to first unread message

riccardo...@gmail.com

unread,
Aug 4, 2018, 10:36:44 AM8/4/18
to Magenta Discuss
I'm trying to build my Midi Dataset, but I really don't know hou to do it, I used the code on github but it doesn't work.

"MBP-di-Rich:~ Riccardo$ source activate magenta
(magenta) MBP-di-Rich:~ Riccardo$ cd desktop
(magenta) MBP-di-Rich:desktop Riccardo$ cd Midi_full
(magenta) MBP-di-Rich:Midi_full Riccardo$ INPUT_DIRECTORY=<folder containing MIDI and/or MusicXML files. can have child folders.>
-bash: syntax error near unexpected token `newline'
(magenta) MBP-di-Rich:Midi_full Riccardo$
(magenta) MBP-di-Rich:Midi_full Riccardo$ # TFRecord file that will contain NoteSequence protocol buffers.
(magenta) MBP-di-Rich:Midi_full Riccardo$ SEQUENCES_TFRECORD=/tmp/notesequences.tfrecord
(magenta) MBP-di-Rich:Midi_full Riccardo$
(magenta) MBP-di-Rich:Midi_full Riccardo$ convert_dir_to_note_sequences \
>   --input_dir=$INPUT_DIRECTORY \
>   --output_file=$SEQUENCES_TFRECORD \
>   --recursive
CRITICAL:tensorflow:--input_dir required"

(Midi_full is the directory with all the midi files)
It coulde be a very stupid problem, I just moving my firtsts steps into magenta.
 Thanks in advice

riccardo...@gmail.com

unread,
Aug 5, 2018, 1:39:43 PM8/5/18
to Magenta Discuss
Im trying to understand by myself, I've done some progresses but obviously new errors arrived.

"(magenta) MBP-di-Rich:~ Riccardo$ INPUT_DIRECTORY=Midi_full
(magenta) MBP-di-Rich:~ Riccardo$ SEQUENCES_TFRECORD=/tmp/notesequences.tfrecord
(magenta) MBP-di-Rich:~ Riccardo$ convert_dir_to_note_sequences   --input_dir=Midi_full   --output_file=$SEQUENCES_TFRECORD   --recursive
INFO:tensorflow:Converting files in 'Midi_full/'.
Traceback (most recent call last):
  File "/Applications/anaconda3/envs/magenta/bin/convert_dir_to_note_sequences", line 11, in <module>
    sys.exit(console_entry_point())
  File "/Applications/anaconda3/envs/magenta/lib/python2.7/site-packages/magenta/scripts/convert_dir_to_note_sequences.py", line 246, in console_entry_point
    tf.app.run(main)
  File "/Applications/anaconda3/envs/magenta/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 125, in run
    _sys.exit(main(argv))
  File "/Applications/anaconda3/envs/magenta/lib/python2.7/site-packages/magenta/scripts/convert_dir_to_note_sequences.py", line 242, in main
    convert_directory(input_dir, output_file, FLAGS.recursive)
  File "/Applications/anaconda3/envs/magenta/lib/python2.7/site-packages/magenta/scripts/convert_dir_to_note_sequences.py", line 222, in convert_directory
    convert_files(root_dir, '', writer, recursive)
  File "/Applications/anaconda3/envs/magenta/lib/python2.7/site-packages/magenta/scripts/convert_dir_to_note_sequences.py", line 70, in convert_files
    files_in_dir = tf.gfile.ListDirectory(os.path.join(dir_to_convert))
  File "/Applications/anaconda3/envs/magenta/lib/python2.7/site-packages/tensorflow/python/lib/io/file_io.py", line 487, in list_directory
    raise errors.NotFoundError(None, None, "Could not find directory")"

So? What does it mean?
Thanks in advice

Adam Roberts

unread,
Aug 30, 2018, 12:31:57 AM8/30/18
to riccardo...@gmail.com, Magenta Discuss
Sorry Riccardo, just saw this!
Can you file an Issue on GitHub if you're still having this problem?

--
Magenta project: magenta.tensorflow.org
To post to this group, send email to magenta...@tensorflow.org
To unsubscribe from this group, send email to magenta-discu...@tensorflow.org
---
You received this message because you are subscribed to the Google Groups "Magenta Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to magenta-discu...@tensorflow.org.
Reply all
Reply to author
Forward
0 new messages