1.Use register_forward_hook to get feature map
register_forward_hook
2. Use Captum or pytorch-cnn-visualizations to visualize the feature map