ml4a / ml4a

A python library and collection of notebooks for making art with machine learning.

Home Page:https://ml4a.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error going into the second epoch

wesleygoatley opened this issue · comments

First epoch appears to run through fine, then I get this error when it rolls into the second epoch:

Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Users\Tobias\AppData\Local\Programs\Python\Python35\lib\threading.py", line 914, in _bootstrap_inner
self.run()
File "C:\Users\Tobias\AppData\Local\Programs\Python\Python35\lib\threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Tobias\AppData\Local\Programs\Python\Python35\lib\site-packages\keras-1.2.2-py3.5.egg\keras\engine\training.py", line 429, in data_generator_task
generator_output = next(self._generator)
File "seq2seq2.py", line 168, in generate_batches
y = y[idx]
MemoryError

Traceback (most recent call last):
File "seq2seq2.py", line 179, in
model.fit_generator(generator=generate_batches(batch_size, one_hot=False), samples_per_epoch=n_examples, nb_epoch=n_epochs, verbose=1)
File "C:\Users\Tobias\AppData\Local\Programs\Python\Python35\lib\site-packages\keras-1.2.2-py3.5.egg\keras\engine\training.py", line 1532, in fit_generator
str(generator_output))
ValueError: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None

Any clue what is causing this?

hard to say if the first epoch works fine, but you seem to have a None somewhere in your data. also this seq2seq example is somewhat out of date. may be worth consulting this for something more current.