paddleslim.models package

paddleslim.models.image_classification(model, image_shape, class_num, use_gpu=False)

Submodules

paddleslim.models.classification_models module

class paddleslim.models.classification_models.MobileNet
conv_bn_layer(input, filter_size, num_filters, stride, padding, channels=None, num_groups=1, act='relu', use_cudnn=True, name=None)
depthwise_separable(input, num_filters1, num_filters2, num_groups, stride, scale, name=None)
net(input, class_dim=1000, scale=1.0)
paddleslim.models.classification_models.ResNet34(prefix_name='')
paddleslim.models.classification_models.ResNet50(prefix_name='')
class paddleslim.models.classification_models.MobileNetV2(scale=1.0, change_depth=False)
conv_bn_layer(input, filter_size, num_filters, stride, padding, channels=None, num_groups=1, if_act=True, name=None, use_cudnn=True)
inverted_residual_unit(input, num_in_filter, num_filters, ifshortcut, stride, filter_size, padding, expansion_factor, name=None)
invresi_blocks(input, in_c, t, c, n, s, name=None)
net(input, class_dim=1000)
shortcut(input, data_residual)

paddleslim.models.mobilenet module

class paddleslim.models.mobilenet.MobileNet
conv_bn_layer(input, filter_size, num_filters, stride, padding, channels=None, num_groups=1, act='relu', use_cudnn=True, name=None)
depthwise_separable(input, num_filters1, num_filters2, num_groups, stride, scale, name=None)
net(input, class_dim=1000, scale=1.0)

paddleslim.models.mobilenet_v2 module

class paddleslim.models.mobilenet_v2.MobileNetV2(scale=1.0, change_depth=False)
conv_bn_layer(input, filter_size, num_filters, stride, padding, channels=None, num_groups=1, if_act=True, name=None, use_cudnn=True)
inverted_residual_unit(input, num_in_filter, num_filters, ifshortcut, stride, filter_size, padding, expansion_factor, name=None)
invresi_blocks(input, in_c, t, c, n, s, name=None)
net(input, class_dim=1000)
shortcut(input, data_residual)
paddleslim.models.mobilenet_v2.MobileNetV2_x1_0()
paddleslim.models.mobilenet_v2.MobileNetV2_x1_5()
paddleslim.models.mobilenet_v2.MobileNetV2_x2_0()
paddleslim.models.mobilenet_v2.MobileNetV2_scale()

paddleslim.models.resnet module

class paddleslim.models.resnet.ResNet(layers=50, prefix_name='')
basic_block(input, num_filters, stride, is_first, name)
bottleneck_block(input, num_filters, stride, name)
conv_bn_layer(input, num_filters, filter_size, stride=1, groups=1, act=None, name=None)
net(input, class_dim=1000, conv1_name='conv1', fc_name=None)
shortcut(input, ch_out, stride, is_first, name)
paddleslim.models.resnet.ResNet34(prefix_name='')
paddleslim.models.resnet.ResNet50(prefix_name='')
paddleslim.models.resnet.ResNet101()
paddleslim.models.resnet.ResNet152()

paddleslim.models.util module

paddleslim.models.util.image_classification(model, image_shape, class_num, use_gpu=False)