pub struct A2cStats {
pub policy_loss: f64,
pub value_loss: f64,
pub entropy: f64,
pub total_loss: f64,
}Expand description
Per-update A2C training statistics.
Purpose-built (rather than reusing PPO’s
TrainingStats) because A2C has
no clip-fraction / KL / explained-variance diagnostics — the loop
performs a single un-clipped update. All fields are finite host-side
f64s pulled off the autograd tape after the gradient step.
Fields§
§policy_loss: f64Policy-gradient loss -mean(log_prob * advantage).
value_loss: f64Plain-MSE value loss mean((V(s) - returns)^2).
entropy: f64Mean per-row policy entropy (the bonus, before negation/scaling).
total_loss: f64Total optimized loss
policy_loss + value_coef * value_loss + entropy_coef * entropy_loss.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for A2cStats
impl RefUnwindSafe for A2cStats
impl Send for A2cStats
impl Sync for A2cStats
impl Unpin for A2cStats
impl UnsafeUnpin for A2cStats
impl UnwindSafe for A2cStats
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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