runtime-modeling/models.py
def mnasnet_backbone(k, e):
  """Creates a mnasnet-like model with a certain type 
     of MBConv layers (k, e).
  """
  blocks_args = [
      'r1_k3_s11_e1_i32_o16_noskip', 
      'r4_k'+str(k)+'_s22_e'+str(e)+'_i16_o24',
      'r4_k'+str(k)+'_s22_e'+str(e)+'_i24_o40', 
      'r4_k'+str(k)+'_s22_e'+str(e)+'_i40_o80', 
      'r4_k'+str(k)+'_s11_e'+str(e)+'_i80_o96',
      'r4_k'+str(k)+'_s22_e'+str(e)+'_i96_o192', 
      'r1_k3_s11_e6_i192_o320_noskip'
  ]
  decoder = MnasNetDecoder()
  global_params = model_def.GlobalParams(
      batch_norm_momentum=0.99,
      batch_norm_epsilon=1e-3,
      dropout_rate=0.2,
      data_format='channels_last',
      num_classes=1000,
      depth_multiplier=None,
      depth_divisor=8,
      expratio=e,
      kernel=k,
      min_depth=None)
  return decoder.decode(blocks_args), global_params
Creates a mnasnet-like model with a certain type 
     of MBConv layers (k, e).
  
Creates a mnasnet-like model with a certain type
of MBConv layers (k, e).
Creates a mnasnet - like model with a certain type of MBConv layers ( k e ) .
def mnasnet_backbone(k, e):
  blocks_args = [
      'r1_k3_s11_e1_i32_o16_noskip', 
      'r4_k'+str(k)+'_s22_e'+str(e)+'_i16_o24',
      'r4_k'+str(k)+'_s22_e'+str(e)+'_i24_o40', 
      'r4_k'+str(k)+'_s22_e'+str(e)+'_i40_o80', 
      'r4_k'+str(k)+'_s11_e'+str(e)+'_i80_o96',
      'r4_k'+str(k)+'_s22_e'+str(e)+'_i96_o192', 
      'r1_k3_s11_e6_i192_o320_noskip'
  ]
  decoder = MnasNetDecoder()
  global_params = model_def.GlobalParams(
      batch_norm_momentum=0.99,
      batch_norm_epsilon=1e-3,
      dropout_rate=0.2,
      data_format='channels_last',
      num_classes=1000,
      depth_multiplier=None,
      depth_divisor=8,
      expratio=e,
      kernel=k,
      min_depth=None)
  return decoder.decode(blocks_args), global_params
def mnasnet_backbone ( k , e ) : blocks_args = [ 'r1_k3_s11_e1_i32_o16_noskip' , 'r4_k' + str ( k ) + '_s22_e' + str ( e ) + '_i16_o24' , 'r4_k' + str ( k ) + '_s22_e' + str ( e ) + '_i24_o40' , 'r4_k' + str ( k ) + '_s22_e' + str ( e ) + '_i40_o80' , 'r4_k' + str ( k ) + '_s11_e' + str ( e ) + '_i80_o96' , 'r4_k' + str ( k ) + '_s22_e' + str ( e ) + '_i96_o192' , 'r1_k3_s11_e6_i192_o320_noskip' ] decoder = MnasNetDecoder ( ) global_params = model_def . GlobalParams ( batch_norm_momentum = 0.99 , batch_norm_epsilon = 1e-3 , dropout_rate = 0.2 , data_format = 'channels_last' , num_classes = 1000 , depth_multiplier = None , depth_divisor = 8 , expratio = e , kernel = k , min_depth = None ) return decoder . decode ( blocks_args ) , global_params
Creates a mnasnet-like model with a certain type
of MBConv layers (k, e).
Creates a mnasnet - like model with a certain type of MBConv layers ( k e ) .
"""Creates a mnasnet-like model with a certain type 
     of MBConv layers (k, e).
  """
k
e