import numpy as np

import megengine as mge
import megengine.functional as F
import megengine.module as M
import megengine.optimizer as optim

class AdaptiveAvgPool2d(M.Module):
    def __init__(self):
        super().__init__()

    def forward(self, x):
        return F.mean(
F.mean(x, axis=-2, keepdims=True)