(self)
| 181 | # require https://github.com/pytorch/pytorch/pull/39336 |
| 182 | @unittest.skipIf(TORCH_VERSION < (1, 6), "Insufficient pytorch version") |
| 183 | def test_scriptability(self): |
| 184 | def func(x): |
| 185 | boxes = Boxes(x) |
| 186 | return boxes.area() |
| 187 | |
| 188 | f = torch.jit.script(func) |
| 189 | f(torch.rand((3, 4))) |
| 190 | |
| 191 | |
| 192 | if __name__ == "__main__": |