MCPcopy Index your code
hub / github.com/FoundationVision/ByteTrack / get_num_boxes

Method get_num_boxes

tutorials/motr/motr_det.py:91–96  ·  view source on GitHub ↗
(self, num_samples)

Source from the content-addressed store, hash-verified

89 track_losses.items()})
90
91 def get_num_boxes(self, num_samples):
92 num_boxes = torch.as_tensor(num_samples, dtype=torch.float, device=self.sample_device)
93 if is_dist_avail_and_initialized():
94 torch.distributed.all_reduce(num_boxes)
95 num_boxes = torch.clamp(num_boxes / get_world_size(), min=1).item()
96 return num_boxes
97
98 def get_loss(self, loss, outputs, gt_instances, indices, num_boxes, **kwargs):
99 loss_map = {

Callers 1

forwardMethod · 0.95

Calls 1

get_world_sizeFunction · 0.85

Tested by

no test coverage detected