danieldjohnson/biaxial-rnn-music-composition

IOError: [Errno 2] No such file or directory: 'output/sample0.mid'

florenceofficial opened this issue · 2 comments

Can not use cuDNN on context None: cannot compile with cuDNN. We got this error:
/usr/bin/ld: cannot find -lcudnn
collect2: error: ld returned 1 exit status

Mapped name None to device cuda: GeForce GTX 750 Ti (0000:01:00.0)
Loaded DEB_PASS
model.py:370: UserWarning: Updating an OrderedUpdates with a non-ordered dictionary with 2+ elements could make your code non-deterministic
self.walk_input: next_input
model.py:373: UserWarning: Updating an OrderedUpdates with a non-ordered dictionary with 2+ elements could make your code non-deterministic
updates.update({hidden:newstate for hidden, newstate, layer in zip(self.walk_hiddens, new_states, self.time_model.layers) if has_hidden(layer)})
epoch 0, error=15666.3876953

IOError Traceback (most recent call last)
in ()
44 m = model.Model([300,300],[100,50], dropout=0.5)
45
---> 46 multi_training.trainPiece(m, pcs, 10000)
47
48 pickle.dump( m.learned_config, open( "output/final_learned_config.p", "wb" ) )

/media/yzy1001/pylearning/jupyter_notebook/biaxial-rnn-music-composition-master/multi_training.pyc in trainPiece(model, pieces, epochs, start)
56 if i % 500 == 0 or (i % 100 == 0 and i < 1000):
57 xIpt, xOpt = map(numpy.array, getPieceSegment(pieces))
---> 58 noteStateMatrixToMidi(numpy.concatenate((numpy.expand_dims(xOpt[0], 0), model.predict_fun(batch_len, 1, xIpt[0])), axis=0),'output/sample{}'.format(i))
59 pickle.dump(model.learned_config,open('output/params{}.p'.format(i), 'wb'))
60 signal.signal(signal.SIGINT, old_handler)

/media/yzy1001/pylearning/jupyter_notebook/biaxial-rnn-music-composition-master/midi_to_statematrix.pyc in noteStateMatrixToMidi(statematrix, name)
99 track.append(eot)
100
--> 101 midi.write_midifile("{}.mid".format(name), pattern)

/home/yzy1001/anaconda3/envs/tensorflow_py27/lib/python2.7/site-packages/midi/fileio.pyc in write_midifile(midifile, pattern)
148 def write_midifile(midifile, pattern):
149 if type(midifile) in (str, unicode):
--> 150 midifile = open(midifile, 'wb')
151 writer = FileWriter()
152 return writer.write(midifile, pattern)

IOError: [Errno 2] No such file or directory: 'output/sample0.mid'

Could someone tell me why is it requiring a output file or something, thank you.

Try creating a directory called output. Looks like it is trying to save an output sample, but it can't find the directory to save it in.

Try creating a directory called output. Looks like it is trying to save an output sample, but it can't find the directory to save it in.
Thank you so much for replying me after such a short minutes. I soon found it in README.md after asking the question, should have read it carefully first.