-
-
Notifications
You must be signed in to change notification settings - Fork 200
Closed
Description
Description
Various calculate gradients functions get called in a row, for instance here. The problem is that some of these functions call stan::recover_memory and so are clearing off the autodiff stack that will get used later (here and here).
For instance, when testing fvar<var> values, the sequence here recovers memory on the first call and then calls grad in the subsequent two calls:
calculate_gradients_1storder(expected_gradients1, logprob_funct, x1);
calculate_gradients_1storder(gradients1, logprob, y1);
calculate_gradients_2ndorder(expected_gradients2, logprob_funct, x2);
Current Version:
v3.3.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels