title: how to normalize my image data in Tensorflow Keras
body: <p>As mentioned I'm trying to normalize my dataset before training my model. I was using <code>tf.keras.preprocessing.image.ImageDataGenerator</code> to do this previously.   </p>
  
  <pre><code>        train_data = tf.cast(train_data, tf.float32)
          train_gen = ImageDataGenerator(
              featurewise_center=True,
              featurewise_std_normalization=True
          )
          train_gen.fit(train_data)
          train_generator = train_gen.flow(train_data, train_labels,
                                           batch_size=batch_size,
                                           shuffle=True)
          model.fit(train_generator, epochs=base_epochs)
  </code></pre>
  
  <p>However, I had to give it up because I implemented a complicated loss function using a custom layer. Therefore data and labels are required to be sent to the model separately as inputs. Is there any other function provided in Tensorflow Keras to normalize my samples?</p>