tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

Feedback about Quickstart

Open BhavneetSingh7 opened this issue 3 months ago • 4 comments

There is the following issue on this page: https://docs.pytorch.org/tutorials/beginner/basics/quickstart_tutorial.html#optimizing-the-model-parameters

System specs: Windows 11, python3.11, pytorch==2.8.0+xpu, Intel oneAPI 2025.2.

Been following this tut, I got this error raising from test function

correct += (pred.argmax(1) == y).type(torch.float).sum().item()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: UR error

Checked all the compatibility of oneAPI, pytorch, and intel_extension_for_pytorch

print(torch.xpu._is_compiled())
print(torch.xpu.is_available())

Both prints True

Really new to ML and NN, but not dev, so tried using torch.FloatTensor correct += (pred.argmax(1) == y).type(torch.FloatTensor).sum().item() It works and output almost matches to what's given in tut.

I hope what I did is correct in terms of ML. If not please suggest where can I lookup to understand this better.

cc @albanD @jbschlosser @gujinghui @EikanWang @fengyuan14 @guangyey

BhavneetSingh7 avatar Oct 10 '25 17:10 BhavneetSingh7