Open sachinkmohan opened 2 years ago
Wonderful repository! Thanks!
Using -> TF 1.15
I wanted to optimize this repository using the tensorflow model optimization techniques but I am having a challenge.
After creating the model as below
# define network parameters n_classes = 1 if len(CLASSES) == 1 else (len(CLASSES) + 1) # case for binary and multiclass segmentation activation = 'sigmoid' if n_classes == 1 else 'softmax' #create model model = sm.Unet(BACKBONE, classes=n_classes, activation=activation)
I checked the type of the model type(model) -> keras.engine.training.Model
type(model)
keras.engine.training.Model
But I need the model type to be -> tensorflow.python.keras.engine.training.Model
tensorflow.python.keras.engine.training.Model
Does someone have an idea how to convert into tensorflow.python.keras.engine.training.Model ?
Have you tried : import segmentation_models as sm sm.set_framework('tf.keras') ?
import segmentation_models as sm
sm.set_framework('tf.keras')
Wonderful repository! Thanks!
Using -> TF 1.15
I wanted to optimize this repository using the tensorflow model optimization techniques but I am having a challenge.
After creating the model as below
I checked the type of the model
type(model)
->keras.engine.training.Model
But I need the model type to be ->
tensorflow.python.keras.engine.training.Model
Does someone have an idea how to convert into
tensorflow.python.keras.engine.training.Model
?