ModuleNotFoundError: No module named 'keras.api'
See original GitHub issueHi I tried to finetune my dataset but I couldn’t solve this problem.
My env:
Ubuntu 18.04
My virtual conda list :
cudatoolkit = 11.2.2
cudnn = 8.1.0.77
tensorflow = 2.6.0
keras = 2.6.0
when I run the code,
`Traceback (most recent call last): File “main.py”, line 24, in <module> import dataloader File “/home/ais/Liberty/automl/efficientdet/dataloader.py”, line 19, in <module> import utils File “/home/ais/Liberty/automl/efficientdet/utils.py”, line 167, in <module> class TpuBatchNormalization(tf.keras.layers.BatchNormalization): File “/home/ais/anaconda3/envs/peace/lib/python3.7/site-packages/tensorflow/python/util/lazy_loader.py”, line 62, in getattr module = self._load() File “/home/ais/anaconda3/envs/peace/lib/python3.7/site-packages/tensorflow/python/util/lazy_loader.py”, line 45, in _load module = importlib.import_module(self.name) File “/home/ais/anaconda3/envs/peace/lib/python3.7/importlib/init.py”, line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level)
`ModuleNotFoundError: No module named ‘keras.api’
I’ve got those error message. I really have no idea about ‘keras.api’ module. Could anyone please tell me what is wrong here??
Issue Analytics
- State:
- Created 2 years ago
- Comments:11
Top Related StackOverflow Question
@ymodak Indeed, the problem is resolved after installing keras 2.6.0. Thanks
@YeonSeo-Kim Hi. I ran into the same error. I consider that this error is specific to the version 2.6.0. For the first aid, I downgraded the keras version from 2.6.0 to 2.4.0 and it worked fine. Please try it.