Body: <p>I use an off-the-shelf convolutional neural network, where at the end of the convolutional part, the depth of the last convolutional layer is expanded and then its 2D average is computed (such that for a tensor of say 8x8x512, you get its 2D average, which is of 1x512). It is a commonly used operation in deep networks, called Global Average Pooling 2D.</p>
  
  <p>The only tensor that is input to the fully-connected part is that 2D averaged 1x512 tensor, i.e., a tensor that should not preserve the 2D information. Yet, my fully-connected last layer neurons, which have been trained to predict the <strong>2D location</strong> of objects, work very well. </p>
  
  <p>I thought about it for a long time and couldn't find any convincing explanation how come the network preserved the 2D information in the averaged tensor. </p>
  
  <p>Any idea?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-27T18:44:21.393Z
Comments.Text: a good explanation can be found at https://stats.stackexchange.com/questions/257321/what-is-global-max-pooling-layer-and-what-is-its-advantage-over-maxpooling-layer.
Comments.UserDisplayName: Gerry P
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-21T06:27:39.850Z
Comments.Text: @GerryP The explanation on your link explains how global-avgpool2d works, yet it doesn't answer how after applying this layer you can still perform 2D detection. They say the opposite actually ("more robust to translations")
Comments.UserDisplayName: SomethingSomething
Tags: <convolutional-neural-networks><computer-vision><object-detection>
Title: How come a detection works after global average pooling 2D?
UserDisplayName: SomethingSomething
ThreadText: # How come a detection works after global average pooling 2D?
  
  (Asked by: username_0 on 2020-04-27)
  
  I use an off-the-shelf convolutional neural network, where at the end of the convolutional part, the depth of the last convolutional layer is expanded and then its 2D average is computed (such that for a tensor of say 8x8x512, you get its 2D average, which is of 1x512). It is a commonly used operation in deep networks, called Global Average Pooling 2D.
  
  The only tensor that is input to the fully-connected part is that 2D averaged 1x512 tensor, i.e., a tensor that should not preserve the 2D information. Yet, my fully-connected last layer neurons, which have been trained to predict the **2D location** of objects, work very well.
  
  I thought about it for a long time and couldn't find any convincing explanation how come the network preserved the 2D information in the averaged tensor.
  
  Any idea?
  
  **Tags:** convolutional-neural-networks, computer-vision, object-detection
  > **Comments:**
  > **username_1**: a good explanation can be found at https://stats.stackexchange.com/questions/257321/what-is-global-max-pooling-layer-and-what-is-its-advantage-over-maxpooling-layer.  
  > **username_0**: @GerryP The explanation on your link explains how global-avgpool2d works, yet it doesn't answer how after applying this layer you can still perform 2D detection. They say the opposite actually ("more robust to translations")  
  
  ---
  
  ## 0 answers
  
  