title: ValueError: steps=None is only valid for a generator based on the keras.utils.Sequence class
body: <p>The decoder module is as follows:</p>
  
  <pre><code>x= Conv2D(4, (3, 3), activation='relu',padding='same')(latent_space)
  x= Conv2D(8, (3, 3), activation='relu',padding='same')(x)
  x= Conv2D(16, (3, 3), activation='relu', padding='same')(x)
  x= Conv2D(16, (3, 3), activation='relu', padding='same')(x)
  x= UpSampling2D(size=(2, 2))(x)
  x= Conv2D(32, (3, 3), activation='relu', padding='same')(x)
  x= Conv2D(32, (3, 3), activation='relu', padding='same')(x)
  x= Conv2D(32, (3, 3), activation='relu', padding='same')(x)
  x= UpSampling2D(size=(2, 2))(x)
  x= Conv2D(64, (3, 3), activation='relu', padding='same')(x)
  x= Conv2D(64, (3, 3), activation='relu', padding='same')(x)
  x= UpSampling2D(size=(2, 2))(x)
  x= Conv2D(128, (3, 3), activation='relu', padding='same')(x)
  x= Conv2D(128, (3, 3), activation='relu', padding='same')(x)
  decoded= Conv2D(3, (3, 3), activation='sigmoid', padding='same')(x)
  </code></pre>
  
  <p>I have extracted the latent space representation after training the autoencoder for some work and now wanted to again pass it to the layers of decoders to predict the reconstructed images by below given instruction. But the given instruction is giving this error:</p>
  
  <pre><code>test_generator.reset()
  decoded_imgs=decoder.predict_generator(latent_space,steps=None) #error in this line
  </code></pre>
  
  <hr>
  
  <pre><code>ValueError Traceback (most recent call last) in ()
  22 #decoded_imgs = decoder.predict(encoded_imgs)
  23 #encoded_imgs=reconstructed
  ---&gt; 24 decoded_imgs=decoder.predict_generator(reconstructed)
  25
  26
  
  ~/VirtualEnvs/deep/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)
  ---&gt; 91 return func(*args, **kwargs)
  92 wrapper._original_function = func
  93 return wrapper
  
  ~/VirtualEnvs/deep/lib/python3.5/site-packages/keras/engine/training.py in 
  predict_generator(self, generator, steps, max_queue_size, workers, 
  use_multiprocessing, verbose)
  1517 workers=workers,
  1518 use_multiprocessing=use_multiprocessing,
  -&gt; 1519 verbose=verbose)
  
  ~/VirtualEnvs/deep/lib/python3.5/site- 
   packages/keras/engine/training_generator.py in predict_generator(model, 
   generator, steps, max_queue_size, workers, use_multiprocessing, verbose)
  401 steps = len(generator)
  402 else:
     --&gt; 403 raise ValueError('steps=None is only valid for a generator'
     404 ' based on the keras.utils.Sequence class.'
    405 ' Please specify steps or use the'
  
    ValueError: steps=None is only valid for a generator based on the 
    keras.utils.Sequence class. Please specify steps or use the 
    keras.utils.Sequence class.
  </code></pre>
  
  <p>Please tell what am I doing wrong in writing this code.
  Help required.....</p>