Skip to content

Commit

Permalink
fix doc; ignore import warning
Browse files Browse the repository at this point in the history
  • Loading branch information
swfsql committed Dec 2, 2023
1 parent e24c8d1 commit 4c6d8c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions dfdx-core/src/tensor_ops/prodigy/cpu_kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ impl<E: num_traits::Float + Dtype + NotMixedPrecision> ProdigyKernel<E> for Cpu
) -> Result<(), Error> {
let mut d_denom_: E = E::zero();
let [beta1, beta2] = cfg.betas.map(E::from_f64).map(Option::unwrap);

#[allow(unused_imports)]
let beta3 = E::from_f64(cfg.beta3.unwrap_or_else(|| {
#[cfg(feature = "no-std")]
use num_traits::Float;
Expand Down
4 changes: 2 additions & 2 deletions dfdx-core/src/tensor_ops/prodigy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ use crate::{
/// Changing some default parameters:
/// ```rust
/// # use dfdx_core::prelude::*;
/// AdamConfig {
/// d_coef: 0.5, // smaller learning rate
/// ProdigyConfig {
/// lr: 1e-4,
/// weight_decay: Some(WeightDecay::L2(1e-1)),
/// ..Default::default()
/// };
Expand Down

0 comments on commit 4c6d8c7

Please sign in to comment.