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

Function random_boxes

tests/layers/test_roi_align.py:117–120  ·  view source on GitHub ↗
(mean_box, stdev, N, maxsize)

Source from the content-addressed store, hash-verified

115 from detectron2 import _C
116
117 def random_boxes(mean_box, stdev, N, maxsize):
118 ret = torch.rand(N, 4) * stdev + torch.tensor(mean_box, dtype=torch.float)
119 ret.clamp_(min=0, max=maxsize)
120 return ret
121
122 def func(N, C, H, W, nboxes_per_img):
123 input = torch.rand(N, C, H, W)

Callers 1

funcFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected