MCPcopy Create free account
hub / github.com/modelscope/modelscope / pad

Method pad

modelscope/utils/cv/image_utils.py:35–36  ·  view source on GitHub ↗
(self, *inputs)

Source from the content-addressed store, hash-verified

33 self._pad = [pad_wd // 2, pad_wd - pad_wd // 2, 0, pad_ht]
34
35 def pad(self, *inputs):
36 return [F.pad(x, self._pad, mode='replicate') for x in inputs]
37
38 def unpad(self, x):
39 ht, wd = x.shape[-2:]

Callers 6

preprocessMethod · 0.95
upfirdn2d_nativeFunction · 0.45
_upfirdn2d_refFunction · 0.45
_tie_or_clone_weightsFunction · 0.45
compute_forwardMethod · 0.45
__call__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected