Closed menari123 closed 2 years ago
1) Please post full error stack. 2) Try to set "sm.set_framework('tf.keras')"
I'm using tensorflow 2.5.0, keras 2.4.3, python 3.8 and anaconda3. I run pip install segmentation-models-3d and when i run import segmentation_models_3d i get this error:
ImportError Traceback (most recent call last)
~/anaconda3/lib/python3.8/site-packages/segmentation_models_3D/init.py in
~/anaconda3/lib/python3.8/site-packages/segmentation_models_3D/init.py in set_framework(name) 70 from tensorflow import keras ---> 71 import efficientnet_3D.tfkeras # init custom objects 72 else:
~/anaconda3/lib/python3.8/site-packages/efficientnet_3D/tfkeras.py in
~/anaconda3/lib/python3.8/site-packages/efficientnet_3D/model.py in
~/anaconda3/lib/python3.8/site-packages/keras_applications/imagenet_utils.py in
~/anaconda3/lib/python3.8/site-packages/keras_applications/init.py in get_keras_submodule(name)
38 if _KERAS_BACKEND is None:
---> 39 raise ImportError('You need to first import keras
'
40 'in order to use keras_applications
. '
ImportError: You need to first import keras
in order to use keras_applications
. For instance, you can do:
import keras
from keras_applications import vgg16
Or, preferably, this equivalent formulation:
from keras import applications
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
Try to uninstall keras completely.
pip uninstall keras
You should make a requirements file
Hello, I'm using tensorflow 2.5.0 and keras 2.4.3 and i get the error in import: ImportError: You need to first
import keras
in order to usekeras_applications
. For instance, you can do:import keras from keras_applications import vgg16
Or, preferably, this equivalent formulation: ``` from keras import applications