(self, input1, input2)
| 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() |