question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ValueError: `validation_steps=None` is only valid for a generator based on the `keras.utils.Sequence` class. Please specify `validation_steps` or use the `keras.utils.Sequence` class.

See original GitHub issue

ValueError Traceback (most recent call last) <ipython-input-22-9e051c003cc7> in <module>() 10 validation_data=val_generator, 11 validation_steps=ceil(val_dataset_size/batch_size), —> 12 initial_epoch=initial_epoch)

~/anaconda2/envs/py3/lib/python3.5/site-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs) 89 warnings.warn('Update your ' + object_name + 90 ' call to the Keras 2 API: ’ + signature, stacklevel=2) —> 91 return func(*args, **kwargs) 92 wrapper._original_function = func 93 return wrapper

~/anaconda2/envs/py3/lib/python3.5/site-packages/keras/engine/training.py in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch) 2105 if (val_gen and not isinstance(validation_data, Sequence) and 2106 not validation_steps): -> 2107 raise ValueError(‘validation_steps=None is only valid for a’ 2108 ’ generator based on the keras.utils.Sequence’ 2109 ’ class. Please specify validation_steps or use’

ValueError: validation_steps=None is only valid for a generator based on the keras.utils.Sequence class. Please specify validation_steps or use the keras.utils.Sequence class. I found an error using ssd-training,thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

17reactions
asetkncommented, Mar 3, 2019

Hi,

I had the same error. My validation_steps were set to: validation_steps=nb_validation_samples // batch_size Turns out my nb_validation_samples were less than batch_size

6reactions
emanuelevivolicommented, Nov 18, 2018

I had the same error, and I came out of this after modified the validation_steps. Maybe it cannot be too low.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ValueError: steps=None is only valid for a generator based on ...
' 405 ' Please specify steps or use the' ValueError: steps=None is only valid for a generator based on the keras.utils.Sequence class. Please ......
Read more >
keras 报错---`validation_steps=None` is only valid for a ...
ValueError : `validation_steps=None` is only valid for a generator based on the `keras.utils.Sequence` class. Please specify ...
Read more >
tf.keras.utils.Sequence | TensorFlow v2.11.0
This structure guarantees that the network will only train once on each sample per epoch which is not the case with generators. Examples:...
Read more >
Autoencoder - LatentLego
Autoencoder base class. ... Keras/tensorflow model object that inputs the data and outputs the latent space. ... Only used if encoder is not...
Read more >
Methods — DeepMatch 0.3.1 documentation
metrics: List of metrics to be evaluated by the model during training and testing. Typically you will use metrics=['accuracy'] . To specify different...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found