Skip to content

Commit c0210d0

Browse files
committed
fix: restore dual-average step size adapt as default
1 parent 4a93b7e commit c0210d0

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/stepsize/adapt.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,16 @@ use crate::{
1515
use std::fmt::Debug;
1616

1717
/// Method used for step size adaptation
18-
#[derive(Debug, Clone, Copy, Serialize)]
18+
#[derive(Debug, Clone, Copy, Serialize, Default)]
1919
pub enum StepSizeAdaptMethod {
2020
/// Use dual averaging for step size adaptation (default)
21+
#[default]
2122
DualAverage,
2223
/// Use Adam optimizer for step size adaptation
2324
Adam,
2425
Fixed(f64),
2526
}
2627

27-
impl Default for StepSizeAdaptMethod {
28-
fn default() -> Self {
29-
StepSizeAdaptMethod::Adam
30-
}
31-
}
32-
3328
/// Options for step size adaptation
3429
#[derive(Debug, Clone, Copy, Serialize)]
3530
pub struct StepSizeAdaptOptions {

0 commit comments

Comments
 (0)