sudoRicheek / Image-Enhancer

An Open-Source, PythonQt5 based Desktop App for up-scaling images using state-of-the-art GAN techniques.
MIT License
42 stars 11 forks source link

BatchNormalization Error when installing #5

Open brittanyflounders opened 1 year ago

brittanyflounders commented 1 year ago

I've been installing the program and all the prerequisites like this: https://www.python.org/ftp/python/3.10.11/python-3.10.11-amd64.exe pip install pyqt5 pip install opencv-python pip install tensorflow

but this is the latest error message I get, and I don't know how to fix it: Traceback (most recent call last): File "C:\Users\user\Desktop\Image-Enhancer-master\run.py", line 1, in from AppWindowQt import Ui_MainWindow File "C:\Users\user\Desktop\Image-Enhancer-master\AppWindowQt.py", line 4, in from AppGuiFunctions import GuiFunctions File "C:\Users\user\Desktop\Image-Enhancer-master\AppGuiFunctions.py", line 5, in from EnhancerGANModel import DeepLearningGANModels File "C:\Users\user\Desktop\Image-Enhancer-master\EnhancerGANModel.py", line 3, in from model.srgan import generator as srgangenerator File "C:\Users\user\Desktop\Image-Enhancer-master\model\srgan.py", line 1, in from tensorflow.python.keras.layers import Add, BatchNormalization, Conv2D, Dense, Flatten, Input, LeakyReLU, PReLU, Lambda ImportError: cannot import name 'BatchNormalization' from 'tensorflow.python.keras.layers' (C:\Python39\lib\site-packages\tensorflow\python\keras\layers__init__.py)

AnMnv commented 1 year ago

Same here

prathikpaip commented 9 months ago

Import it as "from tensorflow.python.layers.normalization import BatchNormalization"