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

Function select_conv2d

PATH/core/models/ops/conv2d_helpers.py:121–130  ·  view source on GitHub ↗
(in_chs, out_chs, kernel_size, **kwargs)

Source from the content-addressed store, hash-verified

119
120# helper method
121def select_conv2d(in_chs, out_chs, kernel_size, **kwargs):
122 assert 'groups' not in kwargs # only use 'depthwise' bool arg
123 if isinstance(kernel_size, list):
124 # We're going to use only lists for defining the MixedConv2d kernel groups,
125 # ints, tuples, other iterables will continue to pass to normal conv and specify h, w.
126 return MixedConv2d(in_chs, out_chs, kernel_size, **kwargs)
127 else:
128 depthwise = kwargs.pop('depthwise', False)
129 groups = out_chs if depthwise else 1
130 return conv2d_pad(in_chs, out_chs, kernel_size, groups=groups, **kwargs)
131

Callers

nothing calls this directly

Calls 2

MixedConv2dClass · 0.85
conv2d_padFunction · 0.85

Tested by

no test coverage detected