title: AttributeError: module 'keras.utils' has no attribute 'Sequence'
body: <pre><code>Traceback (most recent call last):
      File &quot;C:\Users\gutolinPC\Desktop\tensorflow.py&quot;, line 3, in &lt;module&gt;
      from keras.datasets import mnist
      File &quot;C:\Program Files\Python37\lib\site-packages\keras\__init__.py&quot;, line 3,in &lt;module&gt;
      from . import utils
      File &quot;C:\Program Files\Python37\lib\site-packages\keras\utils\__init__.py&quot;, 
      line 6, in &lt;module&gt;
      from . import conv_utils
      File &quot;C:\Program Files\Python37\lib\site-packages\keras\utils\conv_utils.py&quot;, 
      line 9, in &lt;module&gt;
      from .. import backend as K
      File &quot;C:\Program Files\Python37\lib\site-packages\keras\backend\__init__.py&quot;, 
      line 89, in &lt;module&gt;
      from .tensorflow_backend import *
      File &quot;C:\Program Files\Python37\lib\site- 
      packages\keras\backend\tensorflow_backend.py&quot;, line 5, in &lt;module&gt;
      import tensorflow as tf
      File &quot;C:\Users\gutolinPC\Desktop\tensorflow.py&quot;, line 3, in &lt;module&gt;
      from keras.datasets import mnist
      File &quot;C:\Program Files\Python37\lib\site- 
      packages\keras\datasets\__init__.py&quot;, line 4, in &lt;module&gt;
      from . import imdb
      File &quot;C:\Program Files\Python37\lib\site-packages\keras\datasets\imdb.py&quot;, 
      line 8, in &lt;module&gt;
      from ..preprocessing.sequence import _remove_long_seq
      File &quot;C:\Program Files\Python37\lib\site- 
      packages\keras\preprocessing\__init__.py&quot;, line 12, in &lt;module&gt;
      from . import image
      File &quot;C:\Program Files\Python37\lib\site- 
      packages\keras\preprocessing\image.py&quot;, line 11, in &lt;module&gt;
      from keras_preprocessing import image
      File &quot;C:\Program Files\Python37\lib\site- 
      packages\keras_preprocessing\image\__init__.py&quot;, line 6, in &lt;module&gt;
      from .dataframe_iterator import DataFrameIterator
      File &quot;C:\Program Files\Python37\lib\site- 
      packages\keras_preprocessing\image\dataframe_iterator.py&quot;, line 10, in &lt;module&gt;
      from .iterator import BatchFromFilesMixin, Iterator
       File &quot;C:\Program Files\Python37\lib\site-packages\keras_preprocessing\image\iterator.py&quot;, line 13, in &lt;module&gt;
      IteratorType = get_keras_submodule('utils').Sequence
      AttributeError: module 'keras.utils' has no attribute 'Sequence'
  </code></pre>
  <p>Win 10</p>
  <p>python 3.7.0</p>
  <pre><code>Keras                2.2.4
  Keras-Applications   1.0.7
  Keras-Preprocessing  1.0.9
  tensorboard          1.13.1
  tensorflow           1.13.1
  tensorflow-estimator 1.13.0
  </code></pre>
  <p>Full code</p>
  <pre><code>import numpy
  
  from keras.datasets import mnist
  from keras.models import Sequential
  from keras.layers import Dense
  from keras.utils import np_utils
  
  
  numpy.random.seed(42)
  
  
  (X_train, y_train), (X_test, y_test) = mnist.load_data()
  
  X_train = X_train.reshape(60000, 784)
  X_test = X_test.reshape(10000, 784)
  
  X_train = X_train.astype('float32')
  X_test = X_test.astype('float32')
  X_train /= 255
  X_test /= 255
  
  
  Y_train = np_utils.to_categorical(y_train, 10)
  Y_test = np_utils.to_categorical(y_test, 10)
  
  
  model = Sequential()
  
  
  model.add(Dense(800, input_dim=784, activation=&quot;relu&quot;,         
  kernel_initializer=&quot;normal&quot;))
  model.add(Dense(10, activation=&quot;softmax&quot;, kernel_initializer=&quot;normal&quot;))
  
  
  model.compile(loss=&quot;categorical_crossentropy&quot;, optimizer=&quot;SGD&quot;, metrics=[&quot;accuracy&quot;])
  
  print(model.summary())
  
  
  model.fit(X_train, Y_train, batch_size=200, epochs=25, validation_split=0.2, verbose=2)
  
  
  scores = model.evaluate(X_test, Y_test, verbose=0)
  print(&quot;Точность работы на тестовых данных: %.2f%%&quot; % (scores[1]*100))
  </code></pre>