efficientnet icon indicating copy to clipboard operation
efficientnet copied to clipboard

Cannot use multiple EfficientNetB7 backbones in the same model

Open msafi04 opened this issue 4 years ago • 3 comments

I am trying to use 3 'EfficientNetB7' backbones with different input size in the same model but I get the following error.

Is there a way to change the name of the model name?

I tried model._name to set a new name but didn't work.

Please help

ValueError: The name "efficientnet-b7" is used 2 times in the model. All layer names should be unique.

msafi04 avatar Jun 30 '20 03:06 msafi04

You might want to use solution on here

Altough.... this is not documented and subject to change over time 🤔

Smankusors avatar Jul 25 '20 06:07 Smankusors

https://github.com/keras-team/keras/issues/6194#issuecomment-833002993

nrasadi avatar May 05 '21 21:05 nrasadi

quick workaround: wrap one of the models in tf.keras.Sequential([model], name="new_name"). That will resolve the naming issue.

martin-gorner avatar Oct 15 '21 19:10 martin-gorner