Let us assume I have a trained model saved  with 5 hidden layers (fc1,fc2,fc3,fc4,fc5,fc6).
Suppose I need to get output of Fc3 layer from the existing model,
BY defining
def get_activation(name):
def hook(model, input, output):
activation[name] = output.detach()
return hook
hidden_fc3_output = model.fc3.register_forward_hook(get_activation(‘fc3’)) …
How can I use this hidden_fc3_output to pass it explicitly from fc4 layer to get the final fc6 output ?