Skip to content

Commit

Permalink
impl Clone for Adam, SGD, RMSprop (coreylowman#775)
Browse files Browse the repository at this point in the history
  • Loading branch information
coreylowman authored and mattjurenka committed May 13, 2023
1 parent ecfe402 commit 6021491
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/optim/adam/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl Default for AdamConfig {
/// ```
///
/// See module level documentation at [crate::optim] for examples of how to actually use an optimizer.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct Adam<M, E: Dtype, D: DeviceStorage> {
/// Hyperparameter configuration
pub cfg: AdamConfig,
Expand Down
2 changes: 1 addition & 1 deletion src/optim/rmsprop/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl Default for RMSpropConfig {
/// centered: false,
/// weight_decay: Some(WeightDecay::Decoupled(1e-1)),
/// });
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct RMSprop<M, E: Dtype, D: DeviceStorage> {
/// Hyperparameter configuration
pub cfg: RMSpropConfig,
Expand Down
2 changes: 1 addition & 1 deletion src/optim/sgd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl Default for SgdConfig {
/// ```
///
/// See module level documentation at [crate::optim] for examples of how to actually use an optimizer.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct Sgd<M, E: Dtype, D: DeviceStorage> {
/// Hyperparameter configuration
pub cfg: SgdConfig,
Expand Down

0 comments on commit 6021491

Please sign in to comment.