Issue
Suppose I have a tensorflow model model = My_model()
.
I'm trying to understand what the following line of code does:
model_b = tf.keras.Model(inputs=model.input, outputs=model.output)
Does it copy model
's architecture? It's weight values?
Thanks
Solution
"model_b" will have the same architecture as "model", BUT this will NOT copy the weight values. That means that the two models will share the SAME set of weights. Use tf.keras.models.clone_model
to make a distinct copy.
Answered By - Mark Lavin
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.