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
| 4 | |
| 5 | |
| 6 | class 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) |
no outgoing calls