My baseline_m is just a single linear layer, so you would have to access a valid module and its parameter.
If baseline_m contains available parameters, the output of model should also have a grad_fn, although you should check that the gradients are not set in model.