File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -91,17 +91,17 @@ struct ParamsInit{P,S<:AbstractInitStrategy} <: AbstractInitStrategy
91
91
end
92
92
end
93
93
function init (rng:: Random.AbstractRNG , vn:: VarName , dist:: Distribution , p:: ParamsInit )
94
- # TODO (penelopeysm): We should do a check to make sure that all of the
95
- # parameters in `p.params` were actually used, and either warn or error if
96
- # they aren't. This is non-trivial (we need to use something like
97
- # varname_leaves), so I'm going to defer it to a later PR .
94
+ # TODO (penelopeysm): It would be nice to do a check to make sure that all
95
+ # of the parameters in `p.params` were actually used, and either warn or
96
+ # error if they aren't. This is actually quite non-trivial though because
97
+ # the structure of Dicts in particular can have arbitrary nesting .
98
98
return if hasvalue (p. params, vn, dist)
99
99
x = getvalue (p. params, vn, dist)
100
100
if x === missing
101
101
init (rng, vn, dist, p. default)
102
102
else
103
- # TODO (penelopeysm): We could also check that the type of x matches
104
- # the dist?
103
+ # TODO (penelopeysm): Since x is user-supplied, maybe we could also
104
+ # check here that the type / size of x matches the dist?
105
105
x
106
106
end
107
107
else
You can’t perform that action at this time.
0 commit comments