Hi @tomb88 ,
You can refer to this post:

  
    
    
    How to access parameters in a certain layer of pretrained network? 
  
  
    Hi @pinata1337, 
An easy way to find out it is to print your model: 
>>> print(frcnn)
FasterRCNN(
  (transform): GeneralizedRCNNTransform()
  (backbone): Sequential(
    (0): ConvBNReLU(
      (0): Conv2d(3, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)
      (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU6(inplace=True)
    )
[...]

You can always access the submodules of a module by it’s named attribute (or index when th…
  


So in MaskRCNN, you would define a forward hook (find more about it here 66):
mrcnn.roi_heads.box_roi_pool.register_forward_hook(hook_fn)

and your hook_fn would catpure the input.