-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'int' object has no attribute 'value' #125
Comments
I think the fix is as simple as just modifying line 178 to:
Please let me know if this fix is valid. |
If you want to use it in tensorflow 2, I suggest changing in_channels = inputs.shape[-1].value |
It works good ! @Datadote |
I found a solution that worked for me. For this problem, keep code statement as it is ( in_channels = inputs.shape[-1].value ). Install below versions.
If you are trying for tensorflow==2.4.0. I have not tried it but i doubt that its because of keras version. |
If Datadote's solution doesn't work. Maybe you can try just removing ".value" . |
This worked in TF 2.7. |
Use tensorflow==2.7.0 and keras==2.7.0 |
Hi,
I just found the project and was very eager to try it. However, if I want to create the model with:
`import segmentation_models as sm
from model import Deeplabv3
`
I get an error:
Traceback (most recent call last): File "D:/Documents/road_detection/workspace_new/deeplab-v3-plus/Model.py", line 64, in <module> deeplab_model = Deeplabv3(input_shape=(256, 256, 3), classes=1) File "D:\Documents\road_detection\workspace_new\deeplab-v3-plus\deeplab_model.py", line 328, in Deeplabv3 expansion=1, block_id=0, skip_connection=False) File "D:\Documents\road_detection\workspace_new\deeplab-v3-plus\deeplab_model.py", line 178, in _inverted_res_block in_channels = inputs.shape[-1].value # inputs._keras_shape[-1] AttributeError: 'int' object has no attribute 'value'
What am I doing wrong? I am using
tensorflow-gpu 2.0.0
and other models compile fine.
Thanks for input.
Best,
Jan
The text was updated successfully, but these errors were encountered: