Thanks for answering. I am not sure what’s happening here, I followed your steps:
model = hybrid_convnet2.hybrid_cnn().to(device)
t = torch.randn([64,3,256,128]).cuda()

I am able to get the output of model(t) at this stage, but after adding forward hooks
model.fc0.conv2.register_forward_hook(get_activation('fc0.conv2'))
model.fc1.conv2.register_forward_hook(get_activation('fc1.conv2'))

And then calling model(t), it gives NoneType object is not callable error.