1.Use register_forward_hook to get feature map

  
    
    
    How to register_hook on Conv2d? 
  
  
    Hi @Umair_Javaid, 
Simply create a hook function and register it to the by calling register_forward_hook.
  



2. Use Captum or pytorch-cnn-visualizations 3 to visualize the feature map

  
    
    
    How to use heatmaps in predicting where the classifier is focusing on i need some help ,here is the code.how can i go about it? 
  
  
    Captum might give you a good toolset for model interpretability.
  



  
    
    
    How to use heatmaps in predicting where the classifier is focusing on i need some help ,here is the code.how can i go about it? 
  
  
    Before Captum, I use pytorch-cnn-visualizations.