def ResNet101V2(include_top=True, weights='imagenet', input_tensor=None, input_shape=None, pooling=None, classes=1000): """Instantiates the ResNet101V2 architecture.""" def stack_fn(x): x = resnet.stack2(x, 64, 3, name='conv2') x = resnet.stack2(x, 128, 4, name='conv3') x = resnet.stack2(x, 256, 23, name='conv4') return resnet.stack2(x, 512, 3, stride1=1, name='conv5') return resnet.ResNet(stack_fn, True, True, 'resnet101v2', include_top, weights, input_tensor, input_shape, pooling, classes)
def ResNet50(include_top=True, weights=None, input_tensor=None, input_shape=None, pooling=None, classes=1000, use_bias=False, block_fn=bottleneck_block, **kwargs): """Instantiates the ResNet50 architecture.""" def stack_fn(x): x = stack(x, 64, 3, block_fn=block_fn, use_bias=use_bias, stride1=1, name='conv2') x = stack(x, 128, 4, block_fn=block_fn, use_bias=use_bias, name='conv3') x = stack(x, 256, 6, block_fn=block_fn, use_bias=use_bias, name='conv4') return stack(x, 512, 3, block_fn=block_fn, use_bias=use_bias, name='conv5') return resnet.ResNet(stack_fn, False, use_bias, 'custom_resnet50', include_top, weights, input_tensor, input_shape, pooling, classes, **kwargs)