Download detectron2/layers/shape_spec.py from Navyssh/StyleSync: direct link, hf CLI and curl.
- Browser
- Download file 537 Bytes
-
https://huggingface.co/Navyssh/StyleSync/resolve/main/detectron2/layers/shape_spec.py
- Command line
-
hf download hf://Navyssh/StyleSync/detectron2/layers/shape_spec.py
-
curl -L -o shape_spec.py https://huggingface.co/Navyssh/StyleSync/resolve/main/detectron2/layers/shape_spec.py
537 Bytes
| # -*- coding: utf-8 -*- | |
| # Copyright (c) Facebook, Inc. and its affiliates. | |
| from dataclasses import dataclass | |
| from typing import Optional | |
| class ShapeSpec: | |
| """ | |
| 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. | |
| """ | |
| channels: Optional[int] = None | |
| height: Optional[int] = None | |
| width: Optional[int] = None | |
| stride: Optional[int] = None | |