MCPcopy
hub / github.com/hustvl/Vim / func_cat

Method func_cat

det/tests/structures/test_boxes.py:210–215  ·  view source on GitHub ↗
(x: torch.Tensor)

Source from the content-addressed store, hash-verified

208 data = torch.rand((3, 4))
209
210 def func_cat(x: torch.Tensor):
211 boxes1 = Boxes(x)
212 boxes2 = Boxes(x)
213 # boxes3 = Boxes.cat([boxes1, boxes2]) # this is not supported by torchsript for now.
214 boxes3 = boxes1.cat([boxes1, boxes2])
215 return boxes3
216
217 f = torch.jit.script(func_cat)
218 script_box = f(data)

Callers

nothing calls this directly

Calls 2

catMethod · 0.95
BoxesClass · 0.90

Tested by

no test coverage detected