Could you check, if the parameters of your LogisticRegressionModel get valid gradients?
This should print some values other then None after the first backward:
loss.backward()
print(model.linear.weight.grad)