composer.algorithms.functional.apply_blurpool
- composer.algorithms.functional.apply_blurpool(model, replace_convs=True, replace_maxpools=True, blur_first=True)[source]
Applies BlurPool algorithm to the provided model. Performs an in-place replacement of eligible convolution and pooling layers.
- Parameters
model (torch.nn.Module) – model to transform
replace_convs (bool) – replace eligible Conv2D with BlurConv2d. Default: True.
replace_maxpools (bool) – replace eligible MaxPool2d with BlurMaxPool2d. Default: True.
blur_first (bool) – for replace_convs, blur input before conv. Default: True
- Return type