Skip to content

Commit

Permalink
Using make_mut instead of get_mut
Browse files Browse the repository at this point in the history
  • Loading branch information
coreylowman committed Jul 24, 2023
1 parent 2190ba8 commit 6912801
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/tensor_ops/adam/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl AdamConfig {
param.device.adam_kernel(
t,
self,
std::sync::Arc::get_mut(&mut param.data).unwrap(),
std::sync::Arc::make_mut(&mut param.data),
moment1,
moment2,
grad,
Expand Down
2 changes: 1 addition & 1 deletion src/tensor_ops/rmsprop/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl RMSpropConfig {
) -> Result<(), D::Err> {
param.device.rmsprop_kernel(
self,
std::sync::Arc::get_mut(&mut param.data).unwrap(),
std::sync::Arc::make_mut(&mut param.data),
momentum,
square_avg,
grad_avg,
Expand Down
2 changes: 1 addition & 1 deletion src/tensor_ops/sgd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl SgdConfig {
) -> Result<(), D::Err> {
param.device.sgd_kernel(
self,
std::sync::Arc::get_mut(&mut param.data).unwrap(),
std::sync::Arc::make_mut(&mut param.data),
velocity,
grad,
)
Expand Down

0 comments on commit 6912801

Please sign in to comment.