def _global_average_pooling_2d(x): n_rois, n_channel, H, W = x.array.shape h = F.average_pooling_2d(x, (H, W), stride=1) h = F.reshape(h, (n_rois, n_channel)) return h