Traceback (most recent call last): File "train.py", line 11, in <module> from tensorflow_model_optimization.sparsity import keras as sparsity File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/__init__.py", line 85, in <module> from tensorflow_model_optimization.python.core.api import * File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/python/core/api/__init__.py", line 17, in <module> from tensorflow_model_optimization.python.core.api import quantization File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/python/core/api/quantization/__init__.py", line 16, in <module> from tensorflow_model_optimization.python.core.api.quantization import keras File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/python/core/api/quantization/keras/__init__.py", line 22, in <module> from tensorflow_model_optimization.python.core.quantization.keras.quantize import quantize_model File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/python/core/quantization/keras/quantize.py", line 25, in <module> from tensorflow_model_optimization.python.core.quantization.keras.default_8bit import default_8bit_quantize_layout_transform File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/python/core/quantization/keras/default_8bit/default_8bit_quantize_layout_transform.py", line 24, in <module> from tensorflow_model_optimization.python.core.quantization.keras.default_8bit import default_8bit_transforms File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/python/core/quantization/keras/default_8bit/default_8bit_transforms.py", line 29, in <module> from tensorflow_model_optimization.python.core.quantization.keras.default_8bit import default_8bit_quantize_registry File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/python/core/quantization/keras/default_8bit/default_8bit_quantize_registry.py", line 28, in <module> from tensorflow_model_optimization.python.core.quantization.keras.layers import conv_batchnorm File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/python/core/quantization/keras/layers/conv_batchnorm.py", line 28, in <module> from tensorflow.python.keras.layers import normalization ImportError: cannot import name 'normalization' from 'tensorflow.python.keras.layers' (/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/layers/__init__.py)
Hello all,
I have tried to train a model on Google Colab with:
!python train.py --model_type=yolo3_mobilenet_lite --annotation_file=/content/drive/MyDrive/train.txt --classes_path=/content/drive/MyDrive/classes.txt --eval_online --save_eval_checkpoint
This error keeps showing:
Traceback (most recent call last): File "train.py", line 11, in <module> from tensorflow_model_optimization.sparsity import keras as sparsity File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/__init__.py", line 85, in <module> from tensorflow_model_optimization.python.core.api import * File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/python/core/api/__init__.py", line 17, in <module> from tensorflow_model_optimization.python.core.api import quantization File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/python/core/api/quantization/__init__.py", line 16, in <module> from tensorflow_model_optimization.python.core.api.quantization import keras File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/python/core/api/quantization/keras/__init__.py", line 22, in <module> from tensorflow_model_optimization.python.core.quantization.keras.quantize import quantize_model File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/python/core/quantization/keras/quantize.py", line 25, in <module> from tensorflow_model_optimization.python.core.quantization.keras.default_8bit import default_8bit_quantize_layout_transform File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/python/core/quantization/keras/default_8bit/default_8bit_quantize_layout_transform.py", line 24, in <module> from tensorflow_model_optimization.python.core.quantization.keras.default_8bit import default_8bit_transforms File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/python/core/quantization/keras/default_8bit/default_8bit_transforms.py", line 29, in <module> from tensorflow_model_optimization.python.core.quantization.keras.default_8bit import default_8bit_quantize_registry File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/python/core/quantization/keras/default_8bit/default_8bit_quantize_registry.py", line 28, in <module> from tensorflow_model_optimization.python.core.quantization.keras.layers import conv_batchnorm File "/usr/local/lib/python3.7/dist-packages/tensorflow_model_optimization/python/core/quantization/keras/layers/conv_batchnorm.py", line 28, in <module> from tensorflow.python.keras.layers import normalization ImportError: cannot import name 'normalization' from 'tensorflow.python.keras.layers' (/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/layers/__init__.py)
Does anyone have any suggestion? Thanks!