segmentation_models
segmentation_models copied to clipboard
AttributeError
Hello I have imported and created unet using below code : - model = Unet(input_shape=(128,128,3),classes=256) but when i run it it gives me error AttributeError: module 'keras.utils' has no attribute 'get_file' so how can i slove it I have tensorflow == 2.6.2 and keras == 2.6.0
hi, similar problem here. Any solution?
I am having the same problem. Also this one: AttributeError: module 'tensorflow' has no attribute 'to_int32'
AttributeError: in user code:
/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/keras/engine/training.py:853 train_function *
return step_function(self, iterator)
<ipython-input-6-7788975c3f2b>:4 mean_iou *
y_pred_ = tf.to_int32(y_pred > t)
tf 2.6.0 keras 2.6.0
Hello I have imported and created unet using below code : - model = Unet(input_shape=(128,128,3),classes=256) but when i run it it gives me error AttributeError: module 'keras.utils' has no attribute 'get_file' so how can i slove it I have tensorflow == 2.6.2 and keras == 2.6.0
Did you get to find any solution? I did
import segmentation_models as sm
sm.set_framework('tf.keras')
sm.framework()
and it solves that specific error, but now it outputs other similar error :
AttributeError: module 'tensorflow' has no attribute 'to_int32'
actually, I did the same as you and I do not have errors anymore. In which line do you get this error? My problem now is that it doesn't recognize the GPU..
@keval2232 @elliestath Try:
import segmentation_models as sm
sm.set_framework('tf.keras')
sm.framework()