(resnet_size, num_classes, data_format=None)
return imagenet_resnet_v2_generator(
      params['block'], params['layers'], num_classes, data_format)
Returns the ResNet model for a given size and number of output classes.
Returns the ResNet model for a given size and number of output classes.
Returns the ResNet model for a given size and number of output classes .
def imagenet_resnet_v2(resnet_size, num_classes, data_format=None):
  """Returns the ResNet model for a given size and number of output classes."""
  model_params = {
      18: {'block': building_block, 'layers': [2, 2, 2, 2]},
      34: {'block': building_block, 'layers': [3, 4, 6, 3]},
      50: {'block': bottleneck_block, 'layers': [3, 4, 6, 3]},
      101: {'block': bottleneck_block, 'layers': [3, 4, 23, 3]},
      152: {'block': bottleneck_block, 'layers': [3, 8, 36, 3]},
      200: {'block': bottleneck_block, 'layers': [3, 24, 36, 3]}
  }

  if resnet_size not in model_params:
    raise ValueError('Not a valid resnet_size:', resnet_size)

  params = model_params[resnet_size]
  return imagenet_resnet_v2_generator(
      params['block'], params['layers'], num_classes, data_format)
def imagenet_resnet_v2 ( resnet_size , num_classes , data_format = None ) : model_params = { 18 : { 'block' : building_block , 'layers' : [ 2 , 2 , 2 , 2 ] } , 34 : { 'block' : building_block , 'layers' : [ 3 , 4 , 6 , 3 ] } , 50 : { 'block' : bottleneck_block , 'layers' : [ 3 , 4 , 6 , 3 ] } , 101 : { 'block' : bottleneck_block , 'layers' : [ 3 , 4 , 23 , 3 ] } , 152 : { 'block' : bottleneck_block , 'layers' : [ 3 , 8 , 36 , 3 ] } , 200 : { 'block' : bottleneck_block , 'layers' : [ 3 , 24 , 36 , 3 ] } } if resnet_size not in model_params : raise ValueError ( 'Not a valid resnet_size:' , resnet_size ) params = model_params [ resnet_size ] return imagenet_resnet_v2_generator ( params [ 'block' ] , params [ 'layers' ] , num_classes , data_format )