MCPcopy Create free account
hub / github.com/drinkingcoder/FlowFormer-Official / unpad

Method unpad

core/utils/utils.py:23–26  ·  view source on GitHub ↗
(self,x)

Source from the content-addressed store, hash-verified

21 return [F.pad(x, self._pad, mode='replicate') for x in inputs]
22
23 def unpad(self,x):
24 ht, wd = x.shape[-2:]
25 c = [self._pad[2], ht-self._pad[3], self._pad[0], wd-self._pad[1]]
26 return x[..., c[0]:c[1], c[2]:c[3]]
27
28def forward_interpolate(flow):
29 flow = flow.detach().cpu().numpy()

Callers 4

validate_sintelFunction · 0.95
create_sintel_submissionFunction · 0.95
validate_kittiFunction · 0.95
compute_flowFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected