From 584b72603ceb6eff0deea892c649a53975add7ab Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 19 Jan 2022 12:14:49 -1000 Subject: [PATCH 1/2] `export.py` automatic `forward_export` --- export.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/export.py b/export.py index a7a79b46b8bb..589b381e035a 100644 --- a/export.py +++ b/export.py @@ -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 From 4bbc9184dbbb0b020144031130f7b0e34d949209 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 19 Jan 2022 22:15:04 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tutorial.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial.ipynb b/tutorial.ipynb index b160e75adb58..6ff20dc36c40 100644 --- a/tutorial.ipynb +++ b/tutorial.ipynb @@ -1099,4 +1099,4 @@ "outputs": [] } ] -} \ No newline at end of file +}