We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 129b94c commit 9c49bcdCopy full SHA for 9c49bcd
src/adapt_strategy.rs
@@ -352,7 +352,8 @@ impl<F: CpuLogpFunc> AdaptStrategy for ExpWindowDiagAdapt<F> {
352
state
353
.grad
354
.iter()
355
- .map(|&grad| Some((grad).abs().recip().clamp(LOWER_LIMIT, UPPER_LIMIT))),
+ .map(|&grad| grad.abs().recip().clamp(LOWER_LIMIT, UPPER_LIMIT))
356
+ .map(|var| if var.is_finite() { Some(var) } else { Some(1.) })
357
);
358
}
359
0 commit comments