MCPcopy
hub / github.com/open-mmlab/mmdetection / size

Method size

mmdet/structures/bbox/base_boxes.py:205–208  ·  view source on GitHub ↗

Reload new_zeros from self.tensor.

(self, dim: Optional[int] = None)

Source from the content-addressed store, hash-verified

203 return self.tensor.new_zeros(*args, **kwargs)
204
205 def size(self, dim: Optional[int] = None) -> Union[int, torch.Size]:
206 """Reload new_zeros from self.tensor."""
207 # self.tensor.size(dim) cannot work when dim=None.
208 return self.tensor.size() if dim is None else self.tensor.size(dim)
209
210 def dim(self) -> int:
211 """Reload ``dim`` from self.tensor."""

Callers 15

reorder_cls_channelFunction · 0.80
truncate_cls_channelFunction · 0.80
truncate_reg_channelFunction · 0.80
convert_bnFunction · 0.80
shift_predictionsFunction · 0.80
set_gt_scoreMethod · 0.80
__init__Method · 0.80
__len__Method · 0.80
bbox2roiFunction · 0.80
distance2bboxFunction · 0.80
bbox_rescaleFunction · 0.80
scale_boxesFunction · 0.80

Calls

no outgoing calls

Tested by 15

__len__Method · 0.64
__len__Method · 0.64
__len__Method · 0.64
__len__Method · 0.64
test_grid_head_lossMethod · 0.64
test_get_match_scoreMethod · 0.64
test_patch_embedFunction · 0.64
test_patch_mergingFunction · 0.64
assert_params_all_zerosFunction · 0.64