Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during training first epoch #18

Open
HandsomeDevilv112 opened this issue Jul 17, 2016 · 6 comments
Open

Error during training first epoch #18

HandsomeDevilv112 opened this issue Jul 17, 2016 · 6 comments

Comments

@HandsomeDevilv112
Copy link

Apologies, but I'm a little out of my element and I haven't found an answer I find as actionable during my efforts to find an answer. I have the "yourmusiclibrary" files in the proper place after conversion, but I get an error immediately when training.

al@al-System-Product-Name:~/GRUV$ python train.py
Using Theano backend.
Loading training data
Finished loading training data
/usr/local/lib/python2.7/dist-packages/keras/layers/core.py:1021: UserWarning: TimeDistributedDense is deprecated, please use TimeDistributed(Dense(...)) instead.
warnings.warn('TimeDistributedDense is deprecated, '
Starting training!
Iteration: 0
Epoch 1/25
Traceback (most recent call last):
File "train.py", line 48, in
history = model.fit(X_train, y_train, batch_size=batch_size, nb_epoch=epochs_per_iter, verbose=1, validation_split=0.0)
File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 429, in fit
sample_weight=sample_weight)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 1108, in fit
callback_metrics=callback_metrics)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 846, in _fit_loop
callbacks.on_epoch_end(epoch, epoch_logs)
File "/usr/local/lib/python2.7/dist-packages/keras/callbacks.py", line 39, in on_epoch_end
callback.on_epoch_end(epoch, logs)
File "/usr/local/lib/python2.7/dist-packages/keras/callbacks.py", line 195, in on_epoch_end
self.progbar.update(self.seen, self.log_values, force=True)
AttributeError: 'ProgbarLogger' object has no attribute 'log_values'

@natalie-rootcause87
Copy link

I'm getting exactly the same error. I tried setting verbose=0, which allows train.py to finish without an error, but it skips straight from iteration 0 to iteration 25, and I get a different error when running generate.py

@piteight
Copy link

Hi there, I had the same issue, but in my log there was memory error also. The solution was to decrease number of music samples in datasets. When I changed it from 20 samples to 11, error vanished.

@freemso
Copy link

freemso commented May 3, 2017

I got this issue too. And I somehow solve this by manually split validation set and pass a validation_data rather than using validation_split argument.

@vladbph
Copy link

vladbph commented May 6, 2017

When using fit() Keras should throw an exception when using validation_split and training set is ended up to be 0... Example: your last batch in epoch contains 1 sample and validation_split = 0.3 => training size = 0...
When training set size is 0 you will see this exception...
If you look at callbacks.py in keras, class ProgbarLogger, log_values member is created ONLY when batch starts... So if you don't have data in the batch it gets to on_epoch_end with log_values undefined...

@ghost
Copy link

ghost commented Nov 22, 2017

Check if your training data is empty.

@VBota1
Copy link

VBota1 commented Mar 5, 2019

When using fit() Keras should throw an exception when using validation_split and training set is ended up to be 0... Example: your last batch in epoch contains 1 sample and validation_split = 0.3 => training size = 0...
When training set size is 0 you will see this exception...
If you look at callbacks.py in keras, class ProgbarLogger, log_values member is created ONLY when batch starts... So if you don't have data in the batch it gets to on_epoch_end with log_values undefined...

I got this error when the batch size parameter exceeded the number of samples 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants