Skip to content
Advertisement

Obtaining the parameters of layers after concatenation in Keras

I’m trying to get the output and input parameters after concatenation in keras, more specifically in “concat_” and “hidden 6” layers.

JavaScript

Is there way to obtain the parameters by layer name? Also, is there any way to run the model (after training) until the concatenation point?

Advertisement

Answer

You could give each layer that you want to later retrieve, a specific name, like this:

JavaScript

Once you retrieve the layer by name, you can access different attributes, like the inputs, outputs, weights:

JavaScript

To run the model up until a specific layer:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement