Skip to content

Commit fcba947

Browse files
vkuzoSvetlana Karslioglu
authored and
Svetlana Karslioglu
committed
[cheery-pick]update NS for FX tutorial for PyTorch v1.13 (#2089)
Cherry-pick #2089
1 parent 1edc818 commit fcba947

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
]
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)