Hi,
Did you add the whole params ( include model.parameters(), and loss.parameters() )to the optimizer in the first way ?
In the second way, model.parameters() can get model params and loss params so it can be updated and the loss descend. Could you post a code snippet and make us clearer?