HackerPoet/Composer

"No such file or directory: 'PianoNote.bin'" and "No module named custom_layers", when running live_edit.py

Closed this issue · 2 comments

Hi! I've been trying to set up the Composer's source for the past few days, and have finally got to a point where I can run the 'train.py' file and 'load_songs.py' file successfully. However, when trying to run 'live_edit.py', I've gotten to 2 points where online resources have been unable to help me. One I've been able to dummy out for now, and the other I can't get past.

Here's the current log of the first error:

Traceback (most recent call last):
  File "D:\Projects\Neural Net\Music Project 2018\Composer-master\live_edit.py", line 77, in <module>
    piano_sample = np.fromfile('PianoNote.bin', dtype=np.float32)
IOError: [Errno 2] No such file or directory: 'PianoNote.bin'

I assumed this was some kind of piano sample that was missing to play back the midi, so I replaced it with a dummy raw wave for now, and got this error after implementing it:

D:\Projects\Neural Net\Music Project 2018\Composer-master>live_edit.py
D:\python\Anaconda2\lib\site-packages\numpy\core\_methods.py:26: RuntimeWarning: invalid value encountered in reduce
  return umr_maximum(a, axis, None, out, keepdims)
D:\Projects\Neural Net\Music Project 2018\Composer-master\live_edit.py:78: RuntimeWarning: invalid value encountered in divide
  piano_sample /= np.amax(piano_sample)
Loading Keras...
Theano Version: 1.0.2
Using Theano backend.
Keras Version: 2.2.2
Traceback (most recent call last):
  File "D:\Projects\Neural Net\Music Project 2018\Composer-master\live_edit.py", line 182, in <module>
    from custom_layers import PartiallyConnected
ImportError: No module named custom_layers

I've tried installing custom_layers with both conda and pip, and both were unable to find it. I've also tried looking online, and any 'custom_layers.py' file I've found either doesn't have the PartiallyConnected part or is uses tensor instead of keras.

Any help would be greatly appreciated!

I forgot about that piano sample. I didn't end up using it and forgot to remove it.

'custom_layers' is another experiment that didn't end up making it in and I again forgot to remove it. I'll fix both of these in a PR.

Tried out the new commit and it worked! Thank you!