KeyError: 'val_acc' after first epoch - OSX
See original GitHub issueSolutions in this thread: Title issue Using a specific model from a checkpoint, not the initial base model (important) Using the prediction function Pointing the prediction batch mode to test validation data Copying random files to validation
Original post:
The training script is crashing out early on with the following output:
`Found 7372 images belonging to 2 classes. Found 0 images belonging to 0 classes. Epoch 1/1000 103/103 [==============================] - 266s 3s/step - loss: 210.3966 - accuracy: 0.7679
Traceback (most recent call last): File “train-binary.py”, line 118, in <module> validation_steps=nb_validation_samples//batch_size) File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/keras/legacy/interfaces.py”, line 91, in wrapper return func(*args, **kwargs) File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/keras/engine/training.py”, line 1732, in fit_generator initial_epoch=initial_epoch) File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/keras/engine/training_generator.py”, line 260, in fit_generator callbacks.on_epoch_end(epoch, epoch_logs) File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/keras/callbacks/callbacks.py”, line 152, in on_epoch_end callback.on_epoch_end(epoch, logs) File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/keras/callbacks/callbacks.py”, line 702, in on_epoch_end filepath = self.filepath.format(epoch=epoch + 1, **logs) KeyError: ‘val_acc’`
I’m not familiar enough with python to debug this properly and would appreciate any suggestions you might have
thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:25 (1 by maintainers)
Top GitHub Comments
Hi @cderinbogaz yes it would be cool to work together to see if we can come up with something more refined and interesting.
@ashokballolli Did you run predict success?