@@ -94,15 +94,18 @@ There are two positional arguments, which absolutely must be provided:
94
94
95
95
Everything else is optional, and can be categorised into several groups:
96
96
97
- 1. _How to specify the VarInfo._ DynamicPPL contains several different types of
98
- VarInfo objects which change the way model evaluation occurs. If you want to
99
- use a specific type of VarInfo, pass it as the `varinfo` argument.
100
- Otherwise, it will default to using a `TypedVarInfo` generated from the
101
- model.
97
+ 1. _How to specify the VarInfo._
102
98
103
- 2. _How to specify the parameters._ For maximum control over this, generate a
104
- vector of parameters yourself and pass this as the `params` argument. If you
105
- don't specify this, it will be taken from the contents of the VarInfo.
99
+ DynamicPPL contains several different types of VarInfo objects which change
100
+ the way model evaluation occurs. If you want to use a specific type of
101
+ VarInfo, pass it as the `varinfo` argument. Otherwise, it will default to
102
+ using a `TypedVarInfo` generated from the model.
103
+
104
+ 2. _How to specify the parameters._
105
+
106
+ For maximum control over this, generate a vector of parameters yourself and
107
+ pass this as the `params` argument. If you don't specify this, it will be
108
+ taken from the contents of the VarInfo.
106
109
107
110
Note that if the VarInfo is not specified (and thus automatically generated)
108
111
the parameters in it will have been sampled from the prior of the model. If
@@ -116,9 +119,10 @@ Everything else is optional, and can be categorised into several groups:
116
119
prep_params)`. You could then evaluate the gradient at a different set of
117
120
parameters using the `params` keyword argument.
118
121
119
- 3. _How to specify the results to compare against._ (Only if `test=true`.) Once
120
- logp and its gradient has been calculated with the specified `adtype`, it
121
- must be tested for correctness.
122
+ 3. _How to specify the results to compare against._ (Only if `test=true`.)
123
+
124
+ Once logp and its gradient has been calculated with the specified `adtype`,
125
+ it must be tested for correctness.
122
126
123
127
This can be done either by specifying `reference_adtype`, in which case logp
124
128
and its gradient will also be calculated with this reference in order to
@@ -130,12 +134,15 @@ Everything else is optional, and can be categorised into several groups:
130
134
The default reference backend is ForwardDiff. If none of these parameters are
131
135
specified, ForwardDiff will be used to calculate the ground truth.
132
136
133
- 4. _How to specify the tolerances._ (Only if `test=true`.) The tolerances for
134
- the value and gradient can be set using `value_atol` and `grad_atol`. These
135
- default to 1e-6.
137
+ 4. _How to specify the tolerances._ (Only if `test=true`.)
138
+
139
+ The tolerances for the value and gradient can be set using `value_atol` and
140
+ `grad_atol`. These default to 1e-6.
141
+
142
+ 5. _Whether to output extra logging information._
136
143
137
- 5. _Whether to output extra logging information._ By default, this function
138
- prints a message when it runs. To silence it, set `verbose=false`.
144
+ By default, this function prints messages when it runs. To silence it, set
145
+ `verbose=false`.
139
146
"""
140
147
function run_ad (
141
148
model:: Model ,
0 commit comments