Update compute_gradient to include frozen parameters. Otherwise, the finite difference gradient does not include frozen parameters, which creates a shape mismatch for the array expected by get_gradient. This occurs when using a model that has frozen parameters but no user-defined gradient function. I have added such a regression test case.
Update
compute_gradient
to include frozen parameters. Otherwise, the finite difference gradient does not include frozen parameters, which creates a shape mismatch for the array expected byget_gradient
. This occurs when using a model that has frozen parameters but no user-defined gradient function. I have added such a regression test case.