pub struct BcConfig {
pub learning_rate: f64,
pub batch_size: usize,
pub epochs: usize,
pub seed: u64,
}Expand description
Behavioral Cloning configuration parameters.
These hyperparameters control the supervised imitation-learning process:
the policy is trained for epochs passes over a fixed dataset of expert
(observation, action) pairs, drawing shuffled minibatches of
batch_size examples and minimizing cross-entropy against the expert
labels.
Fields§
§learning_rate: f64Learning rate for the supervised policy optimizer.
batch_size: usizeNumber of demonstration examples per minibatch.
epochs: usizeNumber of full passes over the demonstration dataset.
seed: u64Seed threaded into seeded network init and minibatch shuffling for
reproducibility. Two trainers built with the same seed produce
bit-identical training trajectories.
Implementations§
Source§impl BcConfig
impl BcConfig
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validate configuration parameters.
Returns an Err describing the first invalid field encountered.
Sourcepub fn learning_rate(self, lr: f64) -> Self
pub fn learning_rate(self, lr: f64) -> Self
Set the learning rate.
Sourcepub fn batch_size(self, batch_size: usize) -> Self
pub fn batch_size(self, batch_size: usize) -> Self
Set the minibatch size.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BcConfig
impl RefUnwindSafe for BcConfig
impl Send for BcConfig
impl Sync for BcConfig
impl Unpin for BcConfig
impl UnsafeUnpin for BcConfig
impl UnwindSafe for BcConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more