pub struct Trainer<E, P, R> where
    E: Env,
    P: StepProcessorBase<E>,
    R: ReplayBufferBase<PushedItem = P::Output>, 
{ pub env_config_train: E::Config, pub env_config_eval: Option<E::Config>, pub step_proc_config: P::Config, pub replay_buffer_config: R::Config, pub model_dir: Option<String>, pub opt_interval: usize, pub record_interval: usize, pub eval_interval: usize, pub save_interval: usize, pub max_opts: usize, pub eval_episodes: usize, }
Expand description

Manages training loop and related objects.

Fields

env_config_train: E::Config

Configuration of the environment for training.

env_config_eval: Option<E::Config>

Configuration of the environment for evaluation.

If None, env_config_train is used.

step_proc_config: P::Config

Configuration of the transition producer.

replay_buffer_config: R::Config

Configuration of the replay buffer.

model_dir: Option<String>

Where to save the trained model.

opt_interval: usize

Interval of optimization in environment steps.

record_interval: usize

Interval of recording in optimization steps.

eval_interval: usize

Interval of evaluation in optimization steps.

save_interval: usize

Interval of saving the model in optimization steps.

max_opts: usize

The maximal number of optimization steps.

eval_episodes: usize

The number of episodes for evaluation.

Implementations

Constructs a trainer.

Performs a training step.

Train the agent.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.