title: AttributeError: module 'keras.applications.mobilenet' has no attribute 'preprocess'
body: <p>I already imported <strong>preprocess</strong> module but it continuously showed the same error. How should I solve this error?
  Need help to solve this error !</p>
  <p><strong>The imported Libraries are given below,</strong></p>
  <pre><code>import tensorflow as tf
  import keras
  from tensorflow.keras.preprocessing import image_dataset_from_directory
  from keras.preprocessing.image import ImageDataGenerator
  from keras.applications import MobileNet
  from keras.applications.mobilenet import preprocess_input
  </code></pre>
  <p><strong>Image Preparation,</strong></p>
  <pre><code>train_path = 'eggplant/training'
  test_path = 'eggplant/testing'
  valid_path = 'eggplant/validation'
  
  train_batches = ImageDataGenerator(preprocessing_function = keras.applications.mobilenet.preprocess.input).flow_from.directory(train_path, target_size=(224,224), batch_size=10)
  train_batches = ImageDataGenerator(preprocessing_function = keras.applications.mobilenet.preprocess.input).flow_from.directory(valid_path, target_size=(224,224), batch_size=10)
  train_batches = ImageDataGenerator(preprocessing_function = keras.applications.mobilenet.preprocess.input).flow_from.directory(test_path, target_size=(224,224), batch_size=10, shuffle=False)
  </code></pre>
  <p><strong>Error is given below,</strong></p>
  <pre><code>AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-17-fc384b61e2b7&gt; in &lt;module&gt;()
  ----&gt; 1 train_batches = ImageDataGenerator(preprocessing_function = keras.applications.mobilenet.preprocess.input).flow_from.directory(train_path, target_size=(224,224), batch_size=10)
        2 train_batches = ImageDataGenerator(preprocessing_function = keras.applications.mobilenet.preprocess.input).flow_from.directory(valid_path, target_size=(224,224), batch_size=10)
        3 train_batches = ImageDataGenerator(preprocessing_function = keras.applications.mobilenet.preprocess.input).flow_from.directory(test_path, target_size=(224,224), batch_size=10, shuffle=False)
  
  AttributeError: module 'keras.applications.mobilenet' has no attribute 'preprocess'
  </code></pre>