(in_chs, out_chs, kernel_size, **kwargs)
| 119 | |
| 120 | # helper method |
| 121 | def 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 |
nothing calls this directly
no test coverage detected