Skip to content

Commit 3888bcd

Browse files
Svetlana Karsliogluvkuzo
Svetlana Karslioglu
andauthored
[cheery-pick]update NS for FX tutorial for PyTorch v1.13 (#2089) (#2107)
Cherry-pick #2089 Co-authored-by: Vasiliy Kuznetsov <[email protected]>
1 parent e445a48 commit 3888bcd

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.jenkins/validate_tutorials_built.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
"recipes/Captum_Recipe",
5151
"hyperparameter_tuning_tutorial",
5252
"flask_rest_api_tutorial",
53-
"fx_numeric_suite_tutorial", # remove when https://github.com/pytorch/tutorials/pull/2089 is fixed
5453
"text_to_speech_with_torchaudio",
5554
]
5655

prototype_source/fx_numeric_suite_tutorial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ def plot(xdata, ydata, xlabel, ylabel, title):
8484
# Note: quantization APIs are inplace, so we save a copy of the float model for
8585
# later comparison to the quantized model. This is done throughout the
8686
# tutorial.
87-
mobilenetv2_prepared = quantize_fx.prepare_fx(
88-
copy.deepcopy(mobilenetv2_float), qconfig_dict)
8987
datum = torch.randn(1, 3, 224, 224)
88+
mobilenetv2_prepared = quantize_fx.prepare_fx(
89+
copy.deepcopy(mobilenetv2_float), qconfig_dict, (datum,))
9090
mobilenetv2_prepared(datum)
9191
# Note: there is a long standing issue that we cannot copy.deepcopy a
9292
# quantized model. Since quantization APIs are inplace and we need to use

0 commit comments

Comments
 (0)