Performance enhancements for init_strategy
may lead to unexpected behavior.
#1970
Labels
init_strategy
may lead to unexpected behavior.
#1970
There is some dedicated logic to enhance the performance for specific
init_strategy
s. This logic requires thatinit_strategy
is apartial
or a function that returns apartial
. E.g., I expected, maybe naively, that the following init strategy would work.But wrapping in a partial works.
I came across this while trying to write an init strategy where some sites were initialized by value but the remainder initialized to uniform although with a different radius than the default of 2. Is this the intended behavior?
The relevant logic is here.
numpyro/numpyro/infer/util.py
Lines 373 to 384 in d6ba568
numpyro/numpyro/infer/util.py
Lines 742 to 748 in d6ba568
The text was updated successfully, but these errors were encountered: