I want to add new nodes to the output layer to train it later, i'm doing:
def add_outputs(self, n_new_outputs):
out = self.model.get_layer('fc8').output
last_layer = self.model.get_layer('fc7').output
out2 = Dense(n_new_outputs, activation='softmax', name='fc9')(last_layer)
output = merge([out, out2], mode='concat')
self.model = Model(input=self.model.input, output=output)
where 'fc7'is the fully connected layer before the output layer 'fc8'. I exect to have just the last layer with out = self.model.get_layer('fc8').output but the output is all the model.
Is there any way to take just a layer from a network?
Maybe theres other easier way to do it....
Thanks!!!!