See this topic.

  
    
    
    How to remove the adaptive average pool layer from vgg19? vision
  
  
    I have loaded the pretrained model of vgg19. How to remove the adaptive average pool layer which is present before the classifier?