efficientnet
efficientnet copied to clipboard
not able load model
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
When using Tensorflow <= 2.0 you need to use the tfkeras package when importing:
from efficientnet.tfkeras import EfficientNetB0
@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.
This issue is solved, so I suggest to close it.