diff options
Diffstat (limited to 'candle-examples/examples/reinforcement-learning/ddpg.rs')
-rw-r--r-- | candle-examples/examples/reinforcement-learning/ddpg.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/candle-examples/examples/reinforcement-learning/ddpg.rs b/candle-examples/examples/reinforcement-learning/ddpg.rs index 5309eaf6..389caac1 100644 --- a/candle-examples/examples/reinforcement-learning/ddpg.rs +++ b/candle-examples/examples/reinforcement-learning/ddpg.rs @@ -1,5 +1,4 @@ use std::collections::VecDeque; -use std::fmt::Display; use candle::{DType, Device, Error, Module, Result, Tensor, Var}; use candle_nn::{ @@ -167,6 +166,7 @@ fn track( Ok(()) } +#[allow(unused)] struct Actor<'a> { varmap: VarMap, vb: VarBuilder<'a>, @@ -211,7 +211,7 @@ impl Actor<'_> { let target_network = make_network("target-actor")?; // this sets the two networks to be equal to each other using tau = 1.0 - track(&mut varmap, &vb, "target-actor", "actor", &dims, 1.0); + track(&mut varmap, &vb, "target-actor", "actor", &dims, 1.0)?; Ok(Self { varmap, @@ -244,6 +244,7 @@ impl Actor<'_> { } } +#[allow(unused)] struct Critic<'a> { varmap: VarMap, vb: VarBuilder<'a>, @@ -287,7 +288,7 @@ impl Critic<'_> { let target_network = make_network("target-critic")?; // this sets the two networks to be equal to each other using tau = 1.0 - track(&mut varmap, &vb, "target-critic", "critic", &dims, 1.0); + track(&mut varmap, &vb, "target-critic", "critic", &dims, 1.0)?; Ok(Self { varmap, @@ -322,6 +323,7 @@ impl Critic<'_> { } } +#[allow(unused)] #[allow(clippy::upper_case_acronyms)] pub struct DDPG<'a> { actor: Actor<'a>, |