def METHOD_NAME(self, cfg, length):  # to simplify, only count convolution flops
    size = 32
    flops_singlecfg = [0 for j in range(length)]
    flops_doublecfg = np.zeros((length, length))
    flops_squarecfg = [0 for j in range(length)]
    in_c = 16
    cfg_idx = 0
    for i in range(3):
        num_blocks = self.num_blocks[i]
        if i==1 or i==2:
            size = size // 2
        for j in range(num_blocks):
            c = cfg[cfg_idx]
            if i==0 and j==0:
                flops_singlecfg[cfg_idx] += (c * size * size * 4 + c * size * size * 4 + in_c * 3 * 3 * c * size * size)
                flops_squarecfg[cfg_idx] += c * 3 * 3 * c * size * size
            else:
                flops_singlecfg[cfg_idx] += (c * size * size * 4 + c * size * size * 4)
                flops_doublecfg[cfg_idx-1][cfg_idx] += in_c * 3 * 3 * c * size * size
                flops_doublecfg[cfg_idx][cfg_idx-1] += in_c * 3 * 3 * c * size * size
                flops_squarecfg[cfg_idx] += (c * 3 * 3 * c * size * size )
            if in_c != c:
                flops_doublecfg[cfg_idx][cfg_idx-1] += in_c * c * size * size # shortcut
                flops_doublecfg[cfg_idx-1][cfg_idx] += in_c * c * size * size
            in_c = c
            cfg_idx += 1
    flops_singlecfg[-1] += 2 * self.cfg[-1] * self.num_classes # fc layer
    return flops_singlecfg, flops_doublecfg, flops_squarecfg