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

Function _get_padding

PATH/core/models/ops/conv2d_helpers.py:11–13  ·  view source on GitHub ↗
(kernel_size, stride=1, dilation=1, **_)

Source from the content-addressed store, hash-verified

9
10
11def _get_padding(kernel_size, stride=1, dilation=1, **_):
12 padding = ((stride - 1) + dilation * (kernel_size - 1)) // 2
13 return padding
14
15
16def _calc_same_pad(i, k, s, d):

Callers 1

conv2d_padFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected