I have 2 models: model and baseline_m. I froze all of the weights of model, so I can use those gradients to update the parameters of baseline_m.
            baseline_output = baseline_m(baseline_input)

            out, output_sizes = model(baseline_output, input_sizes)
            decoded_output, decoded_offsets = decoder.decode(out, output_sizes)

But then I get:
RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn

Which makes sense, since the gradients are frozen for model. But still, shouldn’t baseline_m update?