MCPcopy Create free account
hub / github.com/PeizeSun/SparseR-CNN / test_scriptability

Method test_scriptability

tests/structures/test_boxes.py:183–189  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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
192if __name__ == "__main__":

Callers

nothing calls this directly

Calls 1

fFunction · 0.85

Tested by

no test coverage detected