ModulatedDeformConv2dPack¶
- class mmcv.ops.ModulatedDeformConv2dPack(*args, **kwargs)[source]¶
A ModulatedDeformable Conv Encapsulation that acts as normal Conv layers.
- Parameters
in_channels (int) – Same as nn.Conv2d.
out_channels (int) – Same as nn.Conv2d.
stride (int) – Same as nn.Conv2d, while tuple is not supported.
padding (int) – Same as nn.Conv2d, while tuple is not supported.
dilation (int) – Same as nn.Conv2d, while tuple is not supported.
groups (int) – Same as nn.Conv2d.
bias (bool or str) – If specified as auto, it will be decided by the norm_cfg. Bias will be set as True if norm_cfg is None, otherwise False.
- forward(x: torch.Tensor) → torch.Tensor[source]¶
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.