瀏覽代碼
`export.py` automatic `forward_export` (#6352)
* `export.py` automatic `forward_export`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
modifyDataloader
Glenn Jocher
GitHub
2 年之前
沒有發現已知的金鑰在資料庫的簽署中
GPG Key ID: 4AEE18F83AFDEB23
共有
2 個文件被更改,包括
3 次插入 和
2 次删除
-
export.py
-
tutorial.ipynb
|
|
@@ -427,7 +427,8 @@ def run(data=ROOT / 'data/coco128.yaml', # 'dataset.yaml path' |
|
|
|
elif isinstance(m, Detect): |
|
|
|
m.inplace = inplace |
|
|
|
m.onnx_dynamic = dynamic |
|
|
|
# m.forward = m.forward_export # assign forward (optional) |
|
|
|
if hasattr(m, 'forward_export'): |
|
|
|
m.forward = m.forward_export # assign custom forward (optional) |
|
|
|
|
|
|
|
for _ in range(2): |
|
|
|
y = model(im) # dry runs |
|
|
@@ -1099,4 +1099,4 @@ |
|
|
|
"outputs": [] |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
} |