Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impl Clone for Adam, SGD, RMSprop #775

Merged
merged 1 commit into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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