I know how to set name of keras model when used sequential but I don't know how to name a functional api based model. Let me re-phrase, I am asking how to set name of a keras model not the layer
Well I experimented a little and it worked, so to name functional api
based keras
model, just pass the input in Model
as follows:
Model(inputs=inputs, outputs=dense_out, name=name)
Well I experimented a little and it worked, so to name functional api based keras model, just pass the input in Model as follows:
Model(inputs=inputs, outputs=dense_out, name=name)
and its name can be excessed in similar way we access sequential one i.e.
model.name
Naming models comes in handy when you are working with bunch of models and want to save them all as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With