Giter Club home page Giter Club logo

amazing-gpt2-piano's Issues

Can't save or play generated sequence

Here is the error:

If someone can help, I will be grateful. Thank you.

Last line of code (lol)

midi.write_midifile("output.mid", pattern)

Produces:

AssertionError Traceback (most recent call last)
in ()
----> 1 midi.write_midifile("output.mid", pattern)

4 frames
/usr/local/lib/python3.6/dist-packages/midi/fileio.py in write_midifile(midifile, pattern)
167 if type(midifile) in (str, str):
168 with open(midifile, 'wb') as out:
--> 169 return write_midifile(out,pattern)
170 writer = FileWriter(midifile)
171 return writer.write(pattern)

/usr/local/lib/python3.6/dist-packages/midi/fileio.py in write_midifile(midifile, pattern)
169 return write_midifile(out,pattern)
170 writer = FileWriter(midifile)
--> 171 return writer.write(pattern)
172
173 def read_midifile(midifile):

/usr/local/lib/python3.6/dist-packages/midi/fileio.py in write(self, pattern)
103 self.write_file_header(pattern,len(pattern))
104 for track in pattern:
--> 105 self.write_track(track)
106
107 def write_file_header(self, pattern, length=None):

/usr/local/lib/python3.6/dist-packages/midi/fileio.py in write_track(self, track)
120 buf = bytearray(b'0'*hlen)
121 for event in track:
--> 122 buf.extend(self.encode_midi_event(event))
123 buf[:hlen] = self.encode_track_header(len(buf)-hlen)
124 self.file.write(buf)

/usr/local/lib/python3.6/dist-packages/midi/fileio.py in encode_midi_event(self, event)
139 ret = bytearray()
140 #assert hasattr(event,'tick'), event
--> 141 assert isinstance(event.tick,int), event.tick
142 ret.extend(write_varlen(event.tick))
143 # is the event a MetaEvent?

AssertionError: 20

Over-fitting/plagiarism issues.

I am training the model on my own MIDI set (~430) files. This way I can hear and experience over-fitting/plagiarism directly and precisely.

But it does not solve the issue of its existence. Should we just accept it? Or there is a good way to minimize it/prevent it?

Can someone recommend a code snippet perhaps? :)

Proper Encoder Needed

Hey guys,

If someone can help to improve or rewrite the encoder for this colab, I will really appreciate it.

Generate Output Sequence and save it to a MIDI file Error

Hi

Five days ago worked well but today when I generate a midi get this error:

Captura de pantalla 2020-08-22 a las 4 51 55

/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:61: TqdmDeprecationWarning: This function will be removed in tqdm==5.0.0
Please use tqdm.notebook.tqdm instead of tqdm.tqdm_notebook
100%
3968/3968 [00:34<00:00, 115.93it/s]
ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.

(1, 4096)
Successfully exported the output to output_file.mid
Downloading output_file.mid
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/IPython/core/interactiveshell.py", line 2882, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 196, in
files.download('/content/output-midis/output_file.mid')
File "/usr/local/lib/python3.6/dist-packages/google/colab/files.py", line 143, in download
raise FileNotFoundError(msg) # pylint: disable=undefined-variable
FileNotFoundError: Cannot find file: /content/output-midis/output_file.mid

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/IPython/core/interactiveshell.py", line 1823, in showtraceback
stb = value.render_traceback()
AttributeError: 'FileNotFoundError' object has no attribute 'render_traceback'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/IPython/core/ultratb.py", line 1132, in get_records
return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
File "/usr/local/lib/python3.6/dist-packages/IPython/core/ultratb.py", line 313, in wrapped
return f(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/IPython/core/ultratb.py", line 358, in _fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "/usr/lib/python3.6/inspect.py", line 1490, in getinnerframes
frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
File "/usr/lib/python3.6/inspect.py", line 1448, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "/usr/lib/python3.6/inspect.py", line 696, in getsourcefile
if getattr(getmodule(object, filename), 'loader', None) is not None:
File "/usr/lib/python3.6/inspect.py", line 733, in getmodule
if ismodule(module) and hasattr(module, 'file'):
File "/tensorflow-1.15.2/python3.6/tensorflow/init.py", line 50, in getattr
module = self._load()
File "/tensorflow-1.15.2/python3.6/tensorflow/init.py", line 44, in _load
module = _importlib.import_module(self.name)
File "/usr/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.estimator'

Loss does not go down

Loss does not go down. I think it is a data problem.
Can someone help, please? :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.