title: ImportError: cannot import name 'LayerNormalization' from 'tensorflow.python.keras.layers.normalization'
body: <p>I am using Python 3.8, Tensorflow 2.5.0 and keras 2.3.1 and I am trying to make a model, but I get error from keras.</p>
  <p>This is my code :</p>
  <pre><code>import cv2
  import os
  import numpy as np
  from keras.layers import Conv2D,Dropout, Flatten, Dense,MaxPooling2D, MaxPool2D
  import keras.layers.normalization
  #from tensorflow.keras.layers import Conv2D,Dropout, Flatten, Dense,MaxPooling2D, MaxPool2D
  from keras_preprocessing.image import ImageDataGenerator
  from sklearn.model_selection import train_test_split
  from keras.models import Sequential
  import pandas as pd
  import random
  from tensorflow.python.keras.utils.np_utils import to_categorical
  
  count = 0
  images = []
  classNo = []
  labelFile = 'signnames.csv'
  classes = 43
  testRatio = 0.2  # if 1000 images split will 200 for testing
  validationRatio = 0.2  # if 1000 images 20% from remaining 800 will be 160 for valid
  path_current = os.getcwd()
  imageDim = (32, 32, 3)
  
  ####IMPORTING THE IMAGES FROM TRAIN FOLDER
  
  for j in range(classes):
      path = os.path.join(path_current, 'train', str(j))
      imagesList = os.listdir(path)
      for i in imagesList:
          image = cv2.imread(path + '\\' + i)
          imageResized = cv2.resize(image, (32, 32))
          imageResized = np.array(imageResized)
          images.append(imageResized)
          classNo.append(count)
      count += 1
  
  images = np.array(images)
  classNo = np.array(classNo)
  
  print(images.shape, classNo.shape)
  
  ##### Split Data - make the train
  X_train, X_test, y_train, y_test = train_test_split(images, classNo, test_size=testRatio)
  X_train, X_validation, y_train, y_validation = train_test_split(X_train, y_train, test_size=validationRatio)
  
  
  #####processing all the images from train, test, validation
  X_train = np.array(list(map(preprocessing, X_train)))  # for all the images
  X_validation = np.array(list(map(preprocessing, X_validation)))
  X_test = np.array(list(map(preprocessing, X_test)))
  cv2.imshow(&quot;GrayScale Images&quot;, X_train[random.randint(0, len(X_train) - 1)])  # just to verify the tain
  # cv2.waitKey(5000)
  
  
  ##### add a depth of 1 - for better lines
  X_train = X_train.reshape(X_train.shape[0], X_train.shape[1], X_train.shape[2], 1)
  X_validation = X_validation.reshape(X_validation.shape[0], X_validation.shape[1], X_validation.shape[2], 1)
  X_test = X_test.reshape(X_test.shape[0], X_test.shape[1], X_test.shape[2], 1)
  
  ####augmentation of images : to make from some images more images, making it more generic, creating various similar images
  dataGen = ImageDataGenerator(width_shift_range=0.1,  # 10%
                               height_shift_range=0.1,
                               zoom_range=0.2,
                               shear_range=0.1,  # distorted along an axis(aplecata)
                               rotation_range=10)  # degrees
  
  dataGen.fit(X_train)
  batches = dataGen.flow(X_train, y_train, batch_size=20)  # generate 20 images when it s called
  X_batch, y_batch = next(batches)
  
  #######from label to one encoding(making matrix with 0 and 1 based on classes number)
  y_test = to_categorical(y_test, classes)
  y_train = to_categorical(y_train, classes)
  y_validation = to_categorical(y_validation, classes)
  
  
  ###########convolution neural network model
  def myModel():
      nodesNr = 500
      filterNr = 60  ##to dont remove pixels based on filter size
      filterSize = (5, 5)  ##the kernel that move around the image to get the features
      # making padding
      filterSize2 = (3, 3)
      poolSize = (
      2, 2)  # for more generalize, to reduce overfitting(when detail and noise in training and go to negative result)
  
      model = Sequential();
      model.add(Conv2D(filterNr, filterSize, activation='relu', input_shape=X_train.shape[1:]))
      model.add(Conv2D(filterNr, filterSize, activation='relu'))
      model.add(MaxPooling2D(pool_size=poolSize))
  
      model.add(Conv2D(filterNr // 2, filterSize2, activation='relu'))
      model.add(Conv2D(filterNr // 2, filterSize2, activation='relu'))
      model.add(MaxPool2D(pool_size=poolSize))
      model.add(Dropout(0.5))
  
      model.add(Flatten())
      model.add(Dense(nodesNr, activation='relu'))
      model.add(Dropout(0.5))
      model.add(Dense(classes, activation='softmax'))  # output layer
  
      model.compile(loss='categorical_crossentropy',optimizer='adam', metrics=['accuracy'])
      return model
  
  
  ####TRAIN
  
  model = myModel()
  print(model.summary())
  
  model.save('traffic_classifier.h5')
  </code></pre>
  <p>I am using PyCharm and I get error from first keras import, at line 8.</p>
  <p>There are the errors:</p>
  <pre><code>Using TensorFlow backend.
  2021-05-15 20:43:16.281415: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll
  Traceback (most recent call last):
    File &quot;E:/FACULTATE ANUL 3 SEMESTRUL 2/Procesarea Imaginilor/proiect/main.py&quot;, line 8, in &lt;module&gt;
      from keras.layers import Conv2D,Dropout, Flatten, Dense,MaxPooling2D, MaxPool2D
    File &quot;C:\Users\My-Pc\AppData\Local\Programs\Python\Python38\lib\site-packages\keras\__init__.py&quot;, line 3, in &lt;module&gt;
      from . import utils
    File &quot;C:\Users\My-Pc\AppData\Local\Programs\Python\Python38\lib\site-packages\keras\utils\__init__.py&quot;, line 6, in &lt;module&gt;
      from . import conv_utils
    File &quot;C:\Users\My-Pc\AppData\Local\Programs\Python\Python38\lib\site-packages\keras\utils\conv_utils.py&quot;, line 9, in &lt;module&gt;
      from .. import backend as K
    File &quot;C:\Users\My-Pc\AppData\Local\Programs\Python\Python38\lib\site-packages\keras\backend\__init__.py&quot;, line 1, in &lt;module&gt;
      from .load_backend import epsilon
    File &quot;C:\Users\My-Pc\AppData\Local\Programs\Python\Python38\lib\site-packages\keras\backend\load_backend.py&quot;, line 90, in &lt;module&gt;
      from .tensorflow_backend import *
    File &quot;C:\Users\My-Pc\AppData\Local\Programs\Python\Python38\lib\site-packages\keras\backend\tensorflow_backend.py&quot;, line 5, in &lt;module&gt;
      import tensorflow as tf
    File &quot;C:\Users\My-Pc\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\__init__.py&quot;, line 41, in &lt;module&gt;
      from tensorflow.python.tools import module_util as _module_util
    File &quot;C:\Users\My-Pc\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\__init__.py&quot;, line 48, in &lt;module&gt;
      from tensorflow.python import keras
    File &quot;C:\Users\My-Pc\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\keras\__init__.py&quot;, line 25, in &lt;module&gt;
      from tensorflow.python.keras import models
    File &quot;C:\Users\My-Pc\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\keras\models.py&quot;, line 20, in &lt;module&gt;
      from tensorflow.python.keras import metrics as metrics_module
    File &quot;C:\Users\My-Pc\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\keras\metrics.py&quot;, line 37, in &lt;module&gt;
      from tensorflow.python.keras import activations
    File &quot;C:\Users\My-Pc\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\keras\activations.py&quot;, line 18, in &lt;module&gt;
      from tensorflow.python.keras.layers import advanced_activations
    File &quot;C:\Users\My-Pc\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\keras\layers\__init__.py&quot;, line 146, in &lt;module&gt;
      from tensorflow.python.keras.layers.normalization import LayerNormalization
  ImportError: cannot import name 'LayerNormalization' from 'tensorflow.python.keras.layers.normalization' (C:\Users\My-Pc\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\keras\layers\normalization\__init__.py)
  </code></pre>