Unable to optimize or load parameters from TemplateExpressionSpec with guesses (v2.0.0a1) #1173
-
|
Hello, I was excited to see the The above will generate an equation of
Thank you so much! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
Ah, interesting edge case! Yes so guesses for templates that have parameters will auto-init all parameters to zero. And it seems in your case this resulted in NaN guesses! So a quick workaround is make your guess equal to: |
Beta Was this translation helpful? Give feedback.
This makes sense to me; it's because the
(#1 / #2)and(#1 / (#2 + 0))are both NaN at initialization (since init param values are 0), so the optimization can't even proceed. So offsetting by the 0.0001 constant is actually the right move here. And it should actually remove that constant once it has found the parameters, so this might not even matter in the end