dlpy.applications.ShuffleNetV1¶
-
dlpy.applications.
ShuffleNetV1
(conn, model_table='ShuffleNetV1', n_classes=1000, n_channels=3, width=224, height=224, norm_stds=(58.395, 57.120000000000005, 57.375), offsets=(123.675, 116.28, 103.53), random_flip=None, random_crop=None, random_mutation=None, scale_factor=1.0, num_shuffle_units=[3, 7, 3], bottleneck_ratio=0.25, groups=3, block_act='identity')¶ Generates a deep learning model with the ShuffleNetV1 architecture. The implementation is revised based on https://github.com/scheckmedia/keras-shufflenet/blob/master/shufflenet.py
Parameters: - conn : CAS
Specifies the CAS connection object.
- model_table : string or dict or CAS table, optional
Specifies the CAS table to store the deep learning model.
- n_classes : int, optional
Specifies the number of classes. If None is assigned, the model will automatically detect the number of classes based on the training set.
Default: 1000- n_channels : int, optional
Specifies the number of the channels (i.e., depth) of the input layer.
Default: 3- width : int, optional
Specifies the width of the input layer.
Default: 32- height : int, optional
Specifies the height of the input layer.
Default: 32- norm_stds : double or iter-of-doubles, optional
Specifies a standard deviation for each channel in the input data. The final input data is normalized with specified means and standard deviations.
Default: (255 * 0.229, 255 * 0.224, 255 * 0.225)- offsets : double or iter-of-doubles, optional
Specifies an offset for each channel in the input data. The final input data is set after applying scaling and subtracting the specified offsets.
Default: (255*0.485, 255*0.456, 255*0.406)- random_flip : string, optional
Specifies how to flip the data in the input layer when image data is used. Approximately half of the input data is subject to flipping.
Valid Values: ‘h’, ‘hv’, ‘v’, ‘none’- random_crop : string, optional
Specifies how to crop the data in the input layer when image data is used. Images are cropped to the values that are specified in the width and height parameters. Only the images with one or both dimensions that are larger than those sizes are cropped.
Valid Values: ‘none’, ‘unique’, ‘randomresized’, ‘resizethencrop’- random_mutation : string, optional
Specifies how to apply data augmentations/mutations to the data in the input layer.
Valid Values: ‘none’, ‘random’- scale_factor : double
- num_shuffle_units: iter-of-int, optional
number of stages (list length) and the number of shufflenet units in a stage beginning with stage 2 because stage 1 is fixed e.g. idx 0 contains 3 + 1 (first shuffle unit in each stage differs) shufflenet units for stage 2 idx 1 contains 7 + 1 Shufflenet Units for stage 3 and idx 2 contains 3 + 1 Shufflenet Units
Default: [3, 7, 3]- bottleneck_ratio : double
bottleneck ratio implies the ratio of bottleneck channels to output channels. For example, bottleneck ratio = 1 : 4 means the output feature map is 4 times the width of the bottleneck feature map.
- groups: int
Specifies the number of groups per channel Default : 3
- block_act : str
Specifies the activation function after depth-wise convolution and batch normalization layer Default : ‘identity’
Returns: References