efficientnet icon indicating copy to clipboard operation
efficientnet copied to clipboard

not able load model

Open RiyazAina-DeepML opened this issue 5 years ago • 3 comments

keras = 2.2.4 tensorflow = 2.0.0

i tried this code from efficientnet.keras import EfficientNetB0 this is imported without error, but when i run following statements it throws effnet = EfficientNetB0(weights=None, include_top=False, input_shape=(400,400,3)) AttributeError: module 'tensorflow' has no attribute 'get_default_graph' what is issue?

RiyazAina-DeepML avatar Jan 04 '20 05:01 RiyazAina-DeepML

@RiyazAina-DeepML When using Tensorflow <= 2.0 you need to use the tfkeras package when importing: from efficientnet.tfkeras import EfficientNetB0

kasperschnack avatar Jan 23 '20 22:01 kasperschnack

@RiyazAina-DeepML When using Tensorflow <= 2.0 you need to use the tfkeras package when importing: **from efficientnet.tfkeras import EfficientNetB0**

Thank you so much, after a full day searching on the internet, your solution worked.

katiyarsachin avatar Oct 19 '20 18:10 katiyarsachin

This issue is solved, so I suggest to close it.

atamazian avatar Feb 15 '22 07:02 atamazian