Not able to use Tf.Keras
See original GitHub issueHi there 😃 First of all thanks a lot for this repository its amazing. I have an issue with using tensorflow as a backend. I follow your instructions on the readme and even tried out both options, i.e.
SM_FRAMEWORK="tf.keras"
import segmentation_models as sm
sm.set_framework("tf.keras")
Unfortunately no matter what I do, as soon as I have Keras installed your module will use Keras as backend and I can switch to tf.Keras (i.e. it will always say Segmentation Models: using keras
framework.). (Note i am using tensorflow 2.0).
If i remove Keras from my installations, it will then use tensorflow 2.0. But somehow this should work by setting it. Can you reproduce this or do you have any idea why this is happening?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
can't import keras from tensorflow - Stack Overflow
If you have conda installed just download tensorflow using it. Create a conda environment called tf and install the latest ...
Read more >Better performance with tf.function | TensorFlow Core
You can use tf.function to make graphs out of your programs. ... However, it's possible that a Python argument is not being used...
Read more >Keras: the Python deep learning API
Built on top of TensorFlow 2, Keras is an industry-strength framework that can scale to large clusters of GPUs or an entire TPU...
Read more >What is tf.keras really?
Neural net from scratch (no tf.keras)¶. Let's first create a model using nothing but TensorFlow tensor operations. We're assuming you're already familiar with ......
Read more >How to correctly install Keras and Tensorflow - ActiveState
Instead of pip installing each package separately, the recommended approach is to install Keras as part of the TensorFlow installation. When you ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @JeremyAlain The second option is (before importing segmentation_models):
not
SM_FRAMEWORK="tf.keras"
That is! I had the version 0.2.1! That’s why! Thanks anyway!