Feature map from r3d_18

I am using the resnet3d18 available in the vision module:

    model = models.video.r3d_18(pretrained=True, progress=False)
    num_features = model.fc.in_features
    model.fc = nn.Linear(num_features, num_classes)

Since the model is being downloaded I am not sure how to label the layers and display the feature maps. Specifically I am trying to visualize the feature map of the first layer.

Can you all please help me out?


To visualize the feature (or activation) maps, you could use forward hooks as given in this example. Let me know, if that works for you.