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

Class ShapeSpec

detectron2/layers/shape_spec.py:6–20  ·  view source on GitHub ↗

A simple structure that contains basic shape specification about a tensor. It is often used as the auxiliary inputs/outputs of models, to complement the lack of shape inference ability among pytorch modules. Attributes: channels: height: width: strid

Source from the content-addressed store, hash-verified

4
5
6class ShapeSpec(namedtuple("_ShapeSpec", ["channels", "height", "width", "stride"])):
7 """
8 A simple structure that contains basic shape specification about a tensor.
9 It is often used as the auxiliary inputs/outputs of models,
10 to complement the lack of shape inference ability among pytorch modules.
11
12 Attributes:
13 channels:
14 height:
15 width:
16 stride:
17 """
18
19 def __new__(cls, *, channels=None, height=None, width=None, stride=None):
20 return super().__new__(cls, channels, height, width, stride)

Callers 15

build_backboneFunction · 0.90
output_shapeMethod · 0.90
output_shapeMethod · 0.90
output_shapeMethod · 0.90
output_shapeMethod · 0.90
__init__Method · 0.90
__init__Method · 0.90
_init_box_headMethod · 0.90
_init_mask_headMethod · 0.90
_init_keypoint_headMethod · 0.90
_init_box_headMethod · 0.90
_init_box_headMethod · 0.90

Calls

no outgoing calls

Tested by 7

test_roi_headsMethod · 0.72
test_rroi_headsMethod · 0.72
test_fast_rcnnMethod · 0.72