Nevermind, I’ve found that I missed p.step() in the loop. After modifying to
for t in range(20):
        y_pred = model(xx)

        loss = loss_fn(y_pred, y)
        if t % 10 == 9:
            print(t, loss.item())

        optimizer.zero_grad()
        loss.backward()

        optimizer.step()
        p.step() # was missing in the code above

I can get the table output.