mmcv.cnn.build_upsample_layer¶
- mmcv.cnn.build_upsample_layer(cfg: Dict, *args, **kwargs) Module[source]¶
Build upsample layer.
- Parameters:
cfg (dict) –
The upsample layer config, which should contain:
type (str): Layer type.
scale_factor (int): Upsample ratio, which is not applicable to deconv.
layer args: Args needed to instantiate a upsample layer.
args (argument list) – Arguments passed to the
__init__method of the corresponding conv layer.kwargs (keyword arguments) – Keyword arguments passed to the
__init__method of the corresponding conv layer.
- Returns:
Created upsample layer.
- Return type:
nn.Module