(h, w)
| 58 | return 0 |
| 59 | |
| 60 | def _unnormalize(h, w): |
| 61 | if align_corners: |
| 62 | new_h = (h + 1) * (in_height - 1) / 2 |
| 63 | new_w = (w + 1) * (in_width - 1) / 2 |
| 64 | else: |
| 65 | new_h = -0.5 + (h + 1) * in_height / 2 |
| 66 | new_w = -0.5 + (w + 1) * in_width / 2 |
| 67 | return (new_h, new_w) |
| 68 | |
| 69 | def _clip_coordinates(x, size): |
| 70 | return min(max(x, 0), size - 1) |
no outgoing calls
no test coverage detected
searching dependent graphs…