Comments (6)
Try to uninstall keras completely.
pip uninstall keras
from segmentation_models_3d.
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 use keras_applications
. For instance, you can do: import keras from keras_applications import vgg16
Or, preferably, this equivalent formulation: ``` from keras import applications
from segmentation_models_3d.
- Please post full error stack.
- Try to set "sm.set_framework('tf.keras')"
from segmentation_models_3d.
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
97 try:
---> 98 set_framework(_framework)
99 except ImportError:
~/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
1 from . import inject_tfkeras_modules, init_tfkeras_custom_objects
----> 2 from . import model
3
~/anaconda3/lib/python3.8/site-packages/efficientnet_3D/model.py in
33 from six.moves import xrange
---> 34 from keras_applications.imagenet_utils import _obtain_input_shape
35 from keras_applications.imagenet_utils import preprocess_input as _preprocess_input
~/anaconda3/lib/python3.8/site-packages/keras_applications/imagenet_utils.py in
12
---> 13 backend = get_keras_submodule('backend')
14 keras_utils = get_keras_submodule('utils')
~/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)
in
----> 1 import segmentation_models_3D as sm
~/anaconda3/lib/python3.8/site-packages/segmentation_models_3D/init.py in
99 except ImportError:
100 other = _TF_KERAS_FRAMEWORK_NAME if _framework == _KERAS_FRAMEWORK_NAME else _KERAS_FRAMEWORK_NAME
--> 101 set_framework(other)
102
103 print('Segmentation Models: using {}
framework.'.format(_KERAS_FRAMEWORK))
~/anaconda3/lib/python3.8/site-packages/segmentation_models_3D/init.py in set_framework(name)
66 if name == _KERAS_FRAMEWORK_NAME:
67 import keras
---> 68 import efficientnet_3D.keras # init custom objects
69 elif name == _TF_KERAS_FRAMEWORK_NAME:
70 from tensorflow import keras
~/anaconda3/lib/python3.8/site-packages/efficientnet_3D/keras.py in
1 from . import inject_keras_modules, init_keras_custom_objects
----> 2 from . import model
3
4 from .preprocessing import center_crop_and_resize
5
~/anaconda3/lib/python3.8/site-packages/efficientnet_3D/model.py in
32
33 from six.moves import xrange
---> 34 from keras_applications.imagenet_utils import _obtain_input_shape
35 from keras_applications.imagenet_utils import preprocess_input as _preprocess_input
36
~/anaconda3/lib/python3.8/site-packages/keras_applications/imagenet_utils.py in
11 from . import get_keras_submodule
12
---> 13 backend = get_keras_submodule('backend')
14 keras_utils = get_keras_submodule('utils')
15
~/anaconda3/lib/python3.8/site-packages/keras_applications/init.py in get_keras_submodule(name)
37 'Requested: %s' % name)
38 if _KERAS_BACKEND is None:
---> 39 raise ImportError('You need to first import keras
'
40 'in order to use keras_applications
. '
41 'For instance, you can do:\n\n'
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
from segmentation_models_3d.
from segmentation_models_3d.
You should make a requirements file
from segmentation_models_3d.
Related Issues (20)
- input dimension HOT 17
- activations
- ValueError: axes don't match array HOT 7
- Haussdorf Distance percentile 95 HOT 2
- Propose README HOT 1
- I am getting error on importing this library segmentation_models_3D HOT 1
- Unable to load mobilenetv2 version HOT 9
- About the final prediction head HOT 4
- how does the 3d cnn pretrained on ImageNet? HOT 1
- Baseline models
- "URL Fetch Failure" on executing training_example.py
- tensorflow2.12 version HOT 1
- Import Error for segmentation_models_3d as sm (TF version: 2.12.0) HOT 4
- No module named 'keras.engine'. HOT 6
- 3D Instance segmentation HOT 1
- Correct Tensorflow/Keras Versions HOT 3
- Update 1.0.7 is not suitable for windows HOT 3
- Error during .fit in latest version. HOT 9
- Index Error HOT 5
- efficientnet stuck at first epoch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from segmentation_models_3d.