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

KeyError: 'val_loss' #16

Open
iot-hunter opened this issue Dec 26, 2018 · 3 comments
Open

KeyError: 'val_loss' #16

iot-hunter opened this issue Dec 26, 2018 · 3 comments

Comments

@iot-hunter
Copy link

when i use this to train my dataset I get this error ,Can you help me ?
Create YOLOv3 model with 9 anchors and 16 classes. [<tf.Tensor 'conv2d_7/BiasAdd:0' shape=(?, ?, ?, 63) dtype=float32>, <tf.Tensor 'conv2d_15/BiasAdd:0' shape=(?, ?, ?, 63) dtype=float32>, <tf.Tensor 'conv2d_23/BiasAdd:0' shape=(?, ?, ?, 63) dtype=float32>] Train on 1887 samples, val on 0 samples, with batch size 4. Epoch 1/30 471/471 [==============================] - 163s 346ms/step - loss: 519.5828 Epoch 2/30 471/471 [==============================] - 161s 342ms/step - loss: 108.0543 Epoch 3/30 471/471 [==============================] - 157s 333ms/step - loss: 91.7087 Traceback (most recent call last): File "train_Mobilenet.py", line 199, in <module> _main() File "train_Mobilenet.py", line 74, in _main callbacks=[logging, checkpoint]) File "/home/tf/anaconda3/envs/keras-yolov3-Mobilenet/lib/python3.5/site-packages/keras/legacy/interfaces.py", line 91, in wrapper return func(*args, **kwargs) File "/home/tf/anaconda3/envs/keras-yolov3-Mobilenet/lib/python3.5/site-packages/keras/engine/training.py", line 2262, in fit_generator callbacks.on_epoch_end(epoch, epoch_logs) File "/home/tf/anaconda3/envs/keras-yolov3-Mobilenet/lib/python3.5/site-packages/keras/callbacks.py", line 77, in on_epoch_end callback.on_epoch_end(epoch, logs) File "/home/tf/anaconda3/envs/keras-yolov3-Mobilenet/lib/python3.5/site-packages/keras/callbacks.py", line 430, in on_epoch_end filepath = self.filepath.format(epoch=epoch + 1, **logs) KeyError: 'val_loss'

@Adamdad
Copy link
Owner

Adamdad commented Dec 26, 2018

It seems that you do not have the validation dataset. Is it right?

@iot-hunter
Copy link
Author

yes ! ! ! thank you very much ,another question is can yolo_Mobilenet.py run on CPU?I only get 2FPS ,but ssd-mobilenet have 15FPS.

change this to
num_train = len(t_lines) v_lines = t_lines[int(num_train*0.84):] t_lines = t_lines[:int(num_train*0.84)]
because my dataset only have 1886 samples,smaller than 8000

@aks8
Copy link

aks8 commented Apr 22, 2021

@Adamdad Can you please explain what is validation dataset in simple words.?

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

3 participants