Skip to content

Commit

Permalink
Expose AdamW parameters (huggingface#1449)
Browse files Browse the repository at this point in the history
* Expose AdamW parameters

* Use reference
  • Loading branch information
rockerBOO authored Dec 17, 2023
1 parent c4cfcf1 commit c630622
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions candle-nn/src/optim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,12 @@ impl AdamW {
};
Self::new(vars, params)
}

pub fn params(&self) -> &ParamsAdamW {
&self.params
}

pub fn set_params(&mut self, params: ParamsAdamW) {
self.params = params;
}
}

0 comments on commit c630622

Please sign in to comment.