Yes, grad1 is correct, I made a typo.
For grad2, that indeed means model.layer1[0].weight.grad I thought I could write directly the output values, without the weights, in the loss  function, since I would like to use t1 instead of t, but this is not possible, is it?