Paddle shuffleV2的构造函数有个小问题

btqmn9zl  于 2022-04-21  发布在  Java
关注(0)|答案(0)|浏览(102)

我看到 paddle 1.6 和 develop 版本上,shuffleV2的构造函数有个小问题,错误提示不对吧?num_groups这个参数从哪儿来的呢?
···

class ShuffleNetV2():
    def __init__(self, scale=1.0):
        self.scale = scale

    def net(self, input, class_dim=1000):
        scale = self.scale
        stage_repeats = [4, 8, 4]

        if scale == 0.25:
            stage_out_channels = [-1, 24, 24, 48, 96, 512]
        elif scale == 0.33:
            stage_out_channels = [-1, 24, 32, 64, 128, 512]
        elif scale == 0.5:
            stage_out_channels = [-1, 24, 48, 96, 192, 1024]
        elif scale == 1.0:
            stage_out_channels = [-1, 24, 116, 232, 464, 1024]
        elif scale == 1.5:
            stage_out_channels = [-1, 24, 176, 352, 704, 1024]
        elif scale == 2.0:
            stage_out_channels = [-1, 24, 224, 488, 976, 2048]
        else:
            raise ValueError("""{} groups is not supported for
                       1x1 Grouped Convolutions""".format(num_groups))

···

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题