MCPcopy Create free account
hub / github.com/NVIDIA/vid2vid / grid_sample

Method grid_sample

models/base_model.py:183–187  ·  view source on GitHub ↗
(self, input1, input2)

Source from the content-addressed store, hash-verified

181
182
183 def grid_sample(self, input1, input2):
184 if self.opt.fp16: # not sure if it's necessary
185 return torch.nn.functional.grid_sample(input1.float(), input2.float(), mode='bilinear', padding_mode='border').half()
186 else:
187 return torch.nn.functional.grid_sample(input1, input2, mode='bilinear', padding_mode='border')
188
189 def resample(self, image, flow):
190 b, c, h, w = image.size()

Callers 1

resampleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected