Reputation: 63
print(model.layers[312].output)
outputs (None,2048)
layer 312 code
Dense(2048, activation='relu',name='first_dense')
number of samples is 8732. I need the output of first_dense layer in shape of (8732,2048). In other words, I need the result of this layer in all samples. How can do it??
Thanks in advance!!
Upvotes: 1
Views: 165
Reputation: 22031
you can create a sub-model and make predictions
new_model = Model(model.input, model.layers[312].output)
new_model.predict(...)
Upvotes: 1