Much obliged for the help! Now I know how to access the layers in that network.
However I still encountered other obstacles while trying to get activations for certain data, at a certain layer of the network(e.g. the output) .
When I tried to obtain activation of a layer of the network with the code:
net = models.detection.fasterrcnn_resnet50_fpn(pretrained=True).eval()
for inputs, targets in trainloader:
aaaa = net(inputs)
bbbb = net(targets)
loss = nn.MSELoss(aaaa, bbbb)
Errors pop out:
RuntimeError: The expanded size of the tensor (128) must match the existing size (800) at non-singleton dimension 2.  Target sizes: [3, 128, 128].  Tensor sizes: [3, 800, 800]
I do not fully understand the meaning of this error because cnn should work for any size of image(128 in my case) as long as they’re consistent…
I think I might need to read some kind of manual about how to access parameters of the network given input data and location of the wanted parameters, still looking just yet.
Is there any insights you could share on this issue?