dlpy.applications.ResNet_Wide

dlpy.applications.ResNet_Wide(conn, model_table='WIDE_RESNET', batch_norm_first=True, number_of_blocks=1, k=4, n_classes=None, n_channels=3, width=32, height=32, scale=1, random_flip=None, random_crop=None, offsets=(103.939, 116.779, 123.68), random_mutation=None, reshape_after_input=None)

Generate a deep learning model with Wide ResNet architecture.

Wide ResNet is just a ResNet with more feature maps in each convolutional layers. The width of ResNet is controlled by widening factor k.

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.

batch_norm_first : bool, optional

Specifies whether to have batch normalization layer before the convolution layer in the residual block. For a detailed discussion about this, please refer to this paper: He, Kaiming, et al. “Identity mappings in deep residual networks.” European Conference on Computer Vision. Springer International Publishing, 2016.
Default: True

number_of_blocks : int

Specifies the number of blocks in a residual group. For example, this value is [2, 2, 2, 2] for the ResNet18 architecture and [3, 4, 6, 3] for the ResNet34 architecture. In this case, the number of blocks are the same for each group as in the ResNet18 architecture.
Default: 1

k : int

Specifies the widening factor.
Default: 4

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: None

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

scale : double, optional

Specifies a scaling factor to be applied to each pixel intensity values.
Default: 1

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’

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: (103.939, 116.779, 123.68)

random_mutation : string, optional

Specifies how to apply data augmentations/mutations to the data in the input layer.
Valid Values: ‘none’, ‘random’

reshape_after_input : Reshape, optional

Specifies whether to add a reshape layer after the input layer.

Returns:
Sequential

References

https://arxiv.org/pdf/1605.07146.pdf