pub struct TrainerConfig {
pub max_opts: usize,
pub model_dir: Option<String>,
pub opt_interval: usize,
pub eval_interval: usize,
pub flush_record_interval: usize,
pub record_compute_cost_interval: usize,
pub record_agent_info_interval: usize,
pub warmup_period: usize,
pub save_interval: usize,
}
Expand description
Configuration of Trainer
.
Fields§
§max_opts: usize
The maximum number of optimization steps.
model_dir: Option<String>
Directory where model parameters will be saved.
opt_interval: usize
Interval of optimization steps in environment steps.
eval_interval: usize
Interval of evaluation in optimization steps.
flush_record_interval: usize
Interval of flushing records in optimization steps.
record_compute_cost_interval: usize
Interval of recording agent information in optimization steps.
record_agent_info_interval: usize
Interval of recording agent information in optimization steps.
warmup_period: usize
Warmup period, for filling replay buffer, in environment steps
save_interval: usize
Intercal of saving model parameters in optimization steps.
Implementations§
Source§impl TrainerConfig
impl TrainerConfig
Sourcepub fn eval_interval(self, v: usize) -> Self
pub fn eval_interval(self, v: usize) -> Self
Sets the interval of evaluation in optimization steps.
Sourcepub fn eval_threshold(self, _v: f32) -> Self
pub fn eval_threshold(self, _v: f32) -> Self
(Deprecated) Sets the evaluation threshold.
Sourcepub fn model_dir<T: Into<String>>(self, model_dir: T) -> Self
pub fn model_dir<T: Into<String>>(self, model_dir: T) -> Self
Sets the directory the trained model being saved.
Sourcepub fn opt_interval(self, opt_interval: usize) -> Self
pub fn opt_interval(self, opt_interval: usize) -> Self
Sets the interval of optimization in environment steps.
Sourcepub fn flush_record_interval(self, flush_record_interval: usize) -> Self
pub fn flush_record_interval(self, flush_record_interval: usize) -> Self
Sets the interval of flushing recordd in optimization steps.
Sourcepub fn record_compute_cost_interval(
self,
record_compute_cost_interval: usize,
) -> Self
pub fn record_compute_cost_interval( self, record_compute_cost_interval: usize, ) -> Self
Sets the interval of computation cost in optimization steps.
Sourcepub fn record_agent_info_interval(
self,
record_agent_info_interval: usize,
) -> Self
pub fn record_agent_info_interval( self, record_agent_info_interval: usize, ) -> Self
Sets the interval of recording agent information in optimization steps.
Sourcepub fn warmup_period(self, warmup_period: usize) -> Self
pub fn warmup_period(self, warmup_period: usize) -> Self
Sets warmup period in environment steps.
Sourcepub fn save_interval(self, save_interval: usize) -> Self
pub fn save_interval(self, save_interval: usize) -> Self
Sets the interval of saving in optimization steps.
Trait Implementations§
Source§impl Clone for TrainerConfig
impl Clone for TrainerConfig
Source§fn clone(&self) -> TrainerConfig
fn clone(&self) -> TrainerConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more