refactor 'odd' to 'even' in config sampler
This commit is contained in:
Родитель
200a3e50c4
Коммит
8c61b54edf
|
@ -63,13 +63,13 @@ class ConcatSampler(BaseConfigSampler):
|
|||
return finegrained_sampling_concats(configs, sample_num)
|
||||
|
||||
|
||||
class CinOddSampler(BaseConfigSampler):
|
||||
class CinEvenSampler(BaseConfigSampler):
|
||||
|
||||
def prior_config_sampling(self, sample_num):
|
||||
return sampling_hw_cin_odd(sample_num)
|
||||
return sampling_hw_cin_even(sample_num)
|
||||
|
||||
def finegrained_config_sampling(self, configs, sample_num):
|
||||
return finegrained_sampling_hw_cin_odd(configs, sample_num)
|
||||
return finegrained_sampling_hw_cin_even(configs, sample_num)
|
||||
|
||||
|
||||
class GlobalAvgPoolSampler(BaseConfigSampler):
|
||||
|
|
|
@ -116,8 +116,8 @@ def finegrained_sampling_hw_cin(cfgs, count):
|
|||
return ncfgs
|
||||
|
||||
|
||||
def finegrained_sampling_hw_cin_odd(cfgs, count):
|
||||
''' sampling configs for kernels with hw and cin (only odd values) parameter, in case for split / se / channelshuffle
|
||||
def finegrained_sampling_hw_cin_even(cfgs, count):
|
||||
''' sampling configs for kernels with hw and cin (only even values) parameter, in case for split / se / channelshuffle
|
||||
Returned params include: (hw, cin)
|
||||
'''
|
||||
ncfgs = []
|
||||
|
|
|
@ -226,8 +226,8 @@ def sampling_hw_cin(count):
|
|||
return ncfgs
|
||||
|
||||
|
||||
def sampling_hw_cin_odd(count):
|
||||
''' sampling configs for kernels with hw and cin (only odd values) parameter, in case for split / se / channelshuffle
|
||||
def sampling_hw_cin_even(count):
|
||||
''' sampling configs for kernels with hw and cin (only even values) parameter, in case for split / se / channelshuffle
|
||||
Returned params include: (hw, cin)
|
||||
'''
|
||||
hws, cins, _, _, _ = read_conv_zoo()
|
||||
|
|
|
@ -32,9 +32,9 @@ __BUILTIN_KERNELS__ = {
|
|||
"avgpool_block": ["AvgPoolBlock", "PoolingSampler"],
|
||||
"fc_block": ["FCBlock", "FCSampler"],
|
||||
"concat_block": ["ConcatBlock", "ConcatSampler"],
|
||||
"split_block": ["SplitBlock", "CinOddSampler"],
|
||||
"channel_shuffle": ["ChannelShuffle", "CinOddSampler"],
|
||||
"se_block": ["SEBlock", "CinOddSampler"],
|
||||
"split_block": ["SplitBlock", "CinEvenSampler"],
|
||||
"channel_shuffle": ["ChannelShuffle", "CinEvenSampler"],
|
||||
"se_block": ["SEBlock", "CinEvenSampler"],
|
||||
"globalavgpool_block": ["GlobalAvgPoolBlock", "GlobalAvgPoolSampler"],
|
||||
"bn_relu": ["BnRelu", "HwCinSampler"],
|
||||
"bn_block": ["BnBlock", "HwCinSampler"],
|
||||
|
|
Загрузка…
Ссылка в новой задаче