Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to name keras model based on functional api

Tags:

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


Solved

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)
like image 946
Upasana Mittal Avatar asked Aug 12 '18 15:08

Upasana Mittal


1 Answers

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.

like image 161
Upasana Mittal Avatar answered Sep 28 '22 18:09

Upasana Mittal