MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / __init__

Method __init__

PATH/core/models/ops/utils.py:12–27  ·  view source on GitHub ↗

Extra keyword arguments supported in addition to those in `torch.nn.Conv2d`: Args: norm (nn.Module, optional): a normalization layer activation (callable(Tensor) -> Tensor): a callable activation function It assumes that norm layer is used before ac

(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

10 """
11
12 def __init__(self, *args, **kwargs):
13 """
14 Extra keyword arguments supported in addition to those in `torch.nn.Conv2d`:
15
16 Args:
17 norm (nn.Module, optional): a normalization layer
18 activation (callable(Tensor) -> Tensor): a callable activation function
19
20 It assumes that norm layer is used before activation.
21 """
22 norm = kwargs.pop("norm", None)
23 activation = kwargs.pop("activation", None)
24 super().__init__(*args, **kwargs)
25
26 self.norm = norm
27 self.activation = activation
28
29 def forward(self, x):
30 # torchscript does not support SyncBatchNorm yet

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected