title: rknn.build failure at Global Average Pool input height/width > 128
body: <p>I am running <a href="https://github.com/rockchip-linux/rknn-toolkit" rel="nofollow noreferrer">rknn toolkit</a> for building a model.rknn for running on RK3566.
  After rknn.load_onnx() successfully, when run rknn.build(), the following error message occur:</p>
  <pre><code>--&gt; Loading model: ./rknn_models/model_3566.onnx done
  --&gt; Building model E build: Global Average Pool input height/width &gt; 128, which is not suppoted! E build: Catch exception when building RKNN model! E build: Traceback (most recent call last): E build:   File &quot;rknn/api/rknn_base.py&quot;, line 2621, in rknn.api.rknn_base.RKNNBase.build E build:   File &quot;rknn/api/graph_optimizer.py&quot;, line 3765, in rknn.api.graph_optimizer.GraphOptimizer.run E build:   File &quot;rknn/api/graph_optimizer.py&quot;, line 3518, in rknn.api.graph_optimizer.GraphOptimizer._fuse_ops E build:   File &quot;rknn/api/graph_optimizer.py&quot;, line 2210, in rknn.api.graph_optimizer._p_convert_global_avgpool_to_conv E build:   File &quot;rknn/api/rknn_log.py&quot;, line 104, in rknn.api.rknn_log.RKNNLog.e E build: ValueError: Global Average Pool input height/width &gt; 128, which is not suppoted! Build pytorch failed!
  </code></pre>
  <p>I checked my source code, I did not use the Global Average Pool anywhere. And actually I did explicitly remove final two layers of basenet (efficientnet) which contains global_pool by assigning them as Identity as below:</p>
  <pre><code>   basemodel_name = 'tf_efficientnet_b5_ap'
      print('Loading base model ()...'.format(basemodel_name), end='')
      basemodel = torch.hub.load('rwightman/gen-efficientnet-pytorch', basemodel_name, pretrained=True)
      print('Done.')
  
      # Remove last layer
      print('Removing last two layers (global_pool &amp; classifier).')
      basemodel.global_pool = nn.Identity()
      basemodel.classifier = nn.Identity()
  </code></pre>
  <p>So it puzzled me why the rknn.build() would complain about the Global Average Pool at all.</p>
  <p>Could anyone help to point me to the potential causes and possible fixes?</p>
  <p>Thanks a lot for your help in advance.</p>