nas-search/supernet_macro.py
def single_path_search(depth_multiplier=None):
  """Creates a single-path supermodel for search:
     See Fig.2 in paper:
       -- 1st and last blocks have 1 MBConv set
       -- The rest 20 blocks have 4 MBConv searchable layers

  Args:
    depth_multiplier: multiplier to number of filters per layer.

  Returns:
    blocks_args: a list of BlocksArgs for internal MnasNet blocks.
    global_params: GlobalParams, global parameters for the model.
  """
  # our supermodel "starting point", where kernels are set to max
  # 5x5 and expansion ratios to 6. Filter sizes are set to MNasNet
  # defaults

  blocks_args = [
      'r1_k3_s11_e1_i32_o16_noskip', 
      'r4_k5_s22_e6_i16_o24',
      'r4_k5_s22_e6_i24_o40', 
      'r4_k5_s22_e6_i40_o80',
      'r4_k5_s11_e6_i80_o96', 
      'r4_k5_s22_e6_i96_o192',
      'r1_k3_s11_e6_i192_o320_noskip'
  ]

  global_params = singlepath_supernet.GlobalParams(
      batch_norm_momentum=0.99,
      batch_norm_epsilon=1e-3,
      dropout_rate=0.2,
      data_format='channels_last',
      num_classes=1000,
      depth_multiplier=depth_multiplier,
      depth_divisor=8,
      min_depth=None,
      search_space='mnasnet')
  decoder = MBConvDecoder()
  return decoder.decode(blocks_args), global_params
Creates a single-path supermodel for search:
     See Fig.2 in paper:
       -- 1st and last blocks have 1 MBConv set
       -- The rest 20 blocks have 4 MBConv searchable layers

  Args:
    depth_multiplier: multiplier to number of filters per layer.

  Returns:
    blocks_args: a list of BlocksArgs for internal MnasNet blocks.
    global_params: GlobalParams, global parameters for the model.
  
Creates a single-path supermodel for search:
See Fig.2 in paper:
1st and last blocks have 1 MBConv set
The rest 20 blocks have 4 MBConv searchable layers
Creates a single - path supermodel for search : See Fig . 2 in paper : 1st and last blocks have 1 MBConv set The rest 20 blocks have 4 MBConv searchable layers
def single_path_search(depth_multiplier=None):
  blocks_args = [
      'r1_k3_s11_e1_i32_o16_noskip', 
      'r4_k5_s22_e6_i16_o24',
      'r4_k5_s22_e6_i24_o40', 
      'r4_k5_s22_e6_i40_o80',
      'r4_k5_s11_e6_i80_o96', 
      'r4_k5_s22_e6_i96_o192',
      'r1_k3_s11_e6_i192_o320_noskip'
  ]
  global_params = singlepath_supernet.GlobalParams(
      batch_norm_momentum=0.99,
      batch_norm_epsilon=1e-3,
      dropout_rate=0.2,
      data_format='channels_last',
      num_classes=1000,
      depth_multiplier=depth_multiplier,
      depth_divisor=8,
      min_depth=None,
      search_space='mnasnet')
  decoder = MBConvDecoder()
  return decoder.decode(blocks_args), global_params
def single_path_search ( depth_multiplier = None ) : blocks_args = [ 'r1_k3_s11_e1_i32_o16_noskip' , 'r4_k5_s22_e6_i16_o24' , 'r4_k5_s22_e6_i24_o40' , 'r4_k5_s22_e6_i40_o80' , 'r4_k5_s11_e6_i80_o96' , 'r4_k5_s22_e6_i96_o192' , 'r1_k3_s11_e6_i192_o320_noskip' ] global_params = singlepath_supernet . GlobalParams ( batch_norm_momentum = 0.99 , batch_norm_epsilon = 1e-3 , dropout_rate = 0.2 , data_format = 'channels_last' , num_classes = 1000 , depth_multiplier = depth_multiplier , depth_divisor = 8 , min_depth = None , search_space = 'mnasnet' ) decoder = MBConvDecoder ( ) return decoder . decode ( blocks_args ) , global_params
Creates a single-path supermodel for search:
See Fig.2 in paper:
 1st and last blocks have 1 MBConv set
 The rest 20 blocks have 4 MBConv searchable layers
Creates a single - path supermodel for search : See Fig . 2 in paper : 1st and last blocks have 1 MBConv set The rest 20 blocks have 4 MBConv searchable layers
"""Creates a single-path supermodel for search:
     See Fig.2 in paper:
       -- 1st and last blocks have 1 MBConv set
       -- The rest 20 blocks have 4 MBConv searchable layers

  Args:
    depth_multiplier: multiplier to number of filters per layer.

  Returns:
    blocks_args: a list of BlocksArgs for internal MnasNet blocks.
    global_params: GlobalParams, global parameters for the model.
  """ # our supermodel "starting point", where kernels are set to max # 5x5 and expansion ratios to 6. Filter sizes are set to MNasNet # defaults
a list of BlocksArgs for internal MnasNet blocks.
global_params: GlobalParams, global parameters for the model.
a list of BlocksArgs for internal MnasNet blocks . global_params : GlobalParams global parameters for the model .
blocks_args
depth_multiplier
multiplier to number of filters per layer.
multiplier to number of filters per layer .