AutoShape() models as DetectMultiBackend() instances (#5845)

* Update AutoShape()

* autodownload ONNX

* Cleanup

* Finish updates

* Add Usage

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* fix device

* Update hubconf.py

* Update common.py

* smart param selection

* autodownload all formats

* autopad only pytorch models

* new_shape edits

* stride tensor fix

* Cleanup
This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-12-04 15:00:07 +01:00
1 parent d885799c71
commit 7bf04d9bbf
4 files changed
+35 -25

No files matched your search

+3 -1
View File
@@ -455,7 +455,9 @@ def download(url, dir='.', unzip=True, delete=True, curl=False, threads=1):
def make_divisible(x, divisor):
# Returns x evenly divisible by divisor
# Returns nearest x divisible by divisor
if isinstance(divisor, torch.Tensor):
divisor = int(divisor.max()) # to int
return math.ceil(x / divisor) * divisor