@@ -133,11 +133,13 @@ given `rng` and `init_strategy`.
133
133
instead.
134
134
"""
135
135
function VarInfo (
136
- rng:: Random.AbstractRNG , model:: Model , init_strategy:: AbstractInitStrategy = PriorInit ()
136
+ rng:: Random.AbstractRNG ,
137
+ model:: Model ,
138
+ init_strategy:: AbstractInitStrategy = InitFromPrior (),
137
139
)
138
140
return typed_varinfo (rng, model, init_strategy)
139
141
end
140
- function VarInfo (model:: Model , init_strategy:: AbstractInitStrategy = PriorInit ())
142
+ function VarInfo (model:: Model , init_strategy:: AbstractInitStrategy = InitFromPrior ())
141
143
return VarInfo (Random. default_rng (), model, init_strategy)
142
144
end
143
145
@@ -207,14 +209,16 @@ Construct a VarInfo object for the given `model`, which has just a single
207
209
# Arguments
208
210
- `rng::Random.AbstractRNG`: The random number generator to use during model evaluation
209
211
- `model::Model`: The model for which to create the varinfo object
210
- - `init_strategy::AbstractInitStrategy`: How the values are to be initialised. Defaults to `PriorInit ()`.
212
+ - `init_strategy::AbstractInitStrategy`: How the values are to be initialised. Defaults to `InitFromPrior ()`.
211
213
"""
212
214
function untyped_varinfo (
213
- rng:: Random.AbstractRNG , model:: Model , init_strategy:: AbstractInitStrategy = PriorInit ()
215
+ rng:: Random.AbstractRNG ,
216
+ model:: Model ,
217
+ init_strategy:: AbstractInitStrategy = InitFromPrior (),
214
218
)
215
219
return last (init!! (rng, model, VarInfo (Metadata ()), init_strategy))
216
220
end
217
- function untyped_varinfo (model:: Model , init_strategy:: AbstractInitStrategy = PriorInit ())
221
+ function untyped_varinfo (model:: Model , init_strategy:: AbstractInitStrategy = InitFromPrior ())
218
222
return untyped_varinfo (Random. default_rng (), model, init_strategy)
219
223
end
220
224
@@ -282,14 +286,16 @@ Return a VarInfo object for the given `model`, which has a NamedTuple of
282
286
# Arguments
283
287
- `rng::Random.AbstractRNG`: The random number generator to use during model evaluation
284
288
- `model::Model`: The model for which to create the varinfo object
285
- - `init_strategy::AbstractInitStrategy`: How the values are to be initialised. Defaults to `PriorInit ()`.
289
+ - `init_strategy::AbstractInitStrategy`: How the values are to be initialised. Defaults to `InitFromPrior ()`.
286
290
"""
287
291
function typed_varinfo (
288
- rng:: Random.AbstractRNG , model:: Model , init_strategy:: AbstractInitStrategy = PriorInit ()
292
+ rng:: Random.AbstractRNG ,
293
+ model:: Model ,
294
+ init_strategy:: AbstractInitStrategy = InitFromPrior (),
289
295
)
290
296
return typed_varinfo (untyped_varinfo (rng, model, init_strategy))
291
297
end
292
- function typed_varinfo (model:: Model , init_strategy:: AbstractInitStrategy = PriorInit ())
298
+ function typed_varinfo (model:: Model , init_strategy:: AbstractInitStrategy = InitFromPrior ())
293
299
return typed_varinfo (Random. default_rng (), model, init_strategy)
294
300
end
295
301
@@ -302,19 +308,21 @@ Return a VarInfo object for the given `model`, which has just a single
302
308
# Arguments
303
309
- `rng::Random.AbstractRNG`: The random number generator to use during model evaluation
304
310
- `model::Model`: The model for which to create the varinfo object
305
- - `init_strategy::AbstractInitStrategy`: How the values are to be initialised. Defaults to `PriorInit ()`.
311
+ - `init_strategy::AbstractInitStrategy`: How the values are to be initialised. Defaults to `InitFromPrior ()`.
306
312
"""
307
313
function untyped_vector_varinfo (vi:: UntypedVarInfo )
308
314
md = metadata_to_varnamedvector (vi. metadata)
309
315
return VarInfo (md, copy (vi. accs))
310
316
end
311
317
function untyped_vector_varinfo (
312
- rng:: Random.AbstractRNG , model:: Model , init_strategy:: AbstractInitStrategy = PriorInit ()
318
+ rng:: Random.AbstractRNG ,
319
+ model:: Model ,
320
+ init_strategy:: AbstractInitStrategy = InitFromPrior (),
313
321
)
314
322
return untyped_vector_varinfo (untyped_varinfo (rng, model, init_strategy))
315
323
end
316
324
function untyped_vector_varinfo (
317
- model:: Model , init_strategy:: AbstractInitStrategy = PriorInit ()
325
+ model:: Model , init_strategy:: AbstractInitStrategy = InitFromPrior ()
318
326
)
319
327
return untyped_vector_varinfo (Random. default_rng (), model, init_strategy)
320
328
end
@@ -328,7 +336,7 @@ Return a VarInfo object for the given `model`, which has a NamedTuple of
328
336
# Arguments
329
337
- `rng::Random.AbstractRNG`: The random number generator to use during model evaluation
330
338
- `model::Model`: The model for which to create the varinfo object
331
- - `init_strategy::AbstractInitStrategy`: How the values are to be initialised. Defaults to `PriorInit ()`.
339
+ - `init_strategy::AbstractInitStrategy`: How the values are to be initialised. Defaults to `InitFromPrior ()`.
332
340
"""
333
341
function typed_vector_varinfo (vi:: NTVarInfo )
334
342
md = map (metadata_to_varnamedvector, vi. metadata)
@@ -340,11 +348,15 @@ function typed_vector_varinfo(vi::UntypedVectorVarInfo)
340
348
return VarInfo (nt, copy (vi. accs))
341
349
end
342
350
function typed_vector_varinfo (
343
- rng:: Random.AbstractRNG , model:: Model , init_strategy:: AbstractInitStrategy = PriorInit ()
351
+ rng:: Random.AbstractRNG ,
352
+ model:: Model ,
353
+ init_strategy:: AbstractInitStrategy = InitFromPrior (),
344
354
)
345
355
return typed_vector_varinfo (untyped_vector_varinfo (rng, model, init_strategy))
346
356
end
347
- function typed_vector_varinfo (model:: Model , init_strategy:: AbstractInitStrategy = PriorInit ())
357
+ function typed_vector_varinfo (
358
+ model:: Model , init_strategy:: AbstractInitStrategy = InitFromPrior ()
359
+ )
348
360
return typed_vector_varinfo (Random. default_rng (), model, init_strategy)
349
361
end
350
362
0 commit comments