You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: HISTORY.md
+20-1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,23 @@
1
1
# DynamicPPL Changelog
2
2
3
+
## 0.36.0
4
+
5
+
### Models now store AD backend types
6
+
7
+
In `DynamicPPL.Model`, an extra field `adtype::Union{Nothing,ADTypes.AbstractADType}` has been added.
8
+
This field is used to store the AD backend which should be used when calculating gradients of the log density.
9
+
10
+
The field can be set by passing an extra argument to the `Model` constructor, but more realistically, it is likely that you will want to manually set the `adtype` field on an existing model using `Model(::Model, ::AbstractADType)`:
As far as `DynamicPPL.Model` is concerned, this field does not actually have any effect.
19
+
However, when a `LogDensityFunction` is constructed from said model, it will inherit the `adtype` field from the model.
20
+
3
21
## 0.35.5
4
22
5
23
Several internal methods have been removed:
@@ -174,7 +192,8 @@ Instead of constructing a `LogDensityProblemAD.ADgradient` object, we now direct
174
192
Note that if you wish, you can still construct an `ADgradient` out of a `LogDensityFunction` object (there is nothing preventing this).
175
193
176
194
However, in this version, `LogDensityFunction` now takes an extra AD type argument.
177
-
If this argument is not provided, the behaviour is exactly the same as before, i.e. you can calculate `logdensity` but not its gradient.
195
+
By default, this AD type is inherited from the model that the `LogDensityFunction` is constructed from.
196
+
If the model does not have an AD type, or if the argument is explicitly set to `nothing`, the behaviour is exactly the same as before, i.e. you can calculate `logdensity` but not its gradient.
178
197
However, if you do pass an AD type, that will allow you to calculate the gradient as well.
179
198
You may thus find that it is easier to instead do this:
0 commit comments