Hi @MrRobot, I changed the x to output but I get the following error:
epoch 1 / 10
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-12-d02b18943b31> in <module>
     40         score = model(X_train)
     41         loss = criterion(input=score, target=y_train)
---> 42         loss.requires_grad = True
     43         loss.backward()
     44 

RuntimeError: you can only change requires_grad flags of leaf variables.

Could you maybe post the working code please?