tutorials
tutorials copied to clipboard
requires_grad=True for an input datapoint?
https://github.com/pytorch/tutorials/blob/f4ebb4d007792f5bc302affa7b360a9710e4a88b/advanced_source/super_resolution_with_onnxruntime.py#L144
It is obscure to me why there is the need to set the flag requires_grad to True for datapoint "x", which has no parameters to be learnt. Is it something required to export the model in onnx?
Thanks.
cc @BowenBao
cc: @thiagocrepaldi
For a faster answer, please post in https://discuss.pytorch.org/
Thanks, we should redo this tutorial.