(x, y, x1, x2, y1, y2)
| 25 | |
| 26 | def pytorch_foward_interpolate(flow): |
| 27 | def get_gaussian_weights(x, y, x1, x2, y1, y2): |
| 28 | w11 = torch.exp(-((x - x1)**2 + (y - y1)**2)) |
| 29 | w12 = torch.exp(-((x - x1)**2 + (y - y2)**2)) |
| 30 | w21 = torch.exp(-((x - x2)**2 + (y - y1)**2)) |
| 31 | w22 = torch.exp(-((x - x2)**2 + (y - y2)**2)) |
| 32 | |
| 33 | return w11, w12, w21, w22 |
| 34 | |
| 35 | def sample_one(img, shiftx, shifty, weight): |
| 36 | """ |
no outgoing calls
no test coverage detected