pub struct TrainingMonitor { /* private fields */ }Expand description
Live training monitor that serves a browser dashboard.
§Usage
use axonml::monitor::TrainingMonitor;
let monitor = TrainingMonitor::new("BlazeFace", 125506)
.total_epochs(50)
.batch_size(32)
.launch();
// In training loop:
monitor.log_epoch(1, 0.5, None, vec![("cls", 0.03), ("bbox", 0.47)]);
monitor.set_status("complete");Implementations§
Source§impl TrainingMonitor
impl TrainingMonitor
Sourcepub fn new(model_name: &str, param_count: usize) -> MonitorBuilder
pub fn new(model_name: &str, param_count: usize) -> MonitorBuilder
Create a new monitor builder.
Sourcepub fn log_epoch(
&self,
epoch: usize,
train_loss: f32,
val_loss: Option<f32>,
extras: Vec<(&str, f32)>,
)
pub fn log_epoch( &self, epoch: usize, train_loss: f32, val_loss: Option<f32>, extras: Vec<(&str, f32)>, )
Log metrics for a completed epoch.
Sourcepub fn set_status(&self, status: &str)
pub fn set_status(&self, status: &str)
Update the monitor status (e.g., “training”, “complete”, “evaluating”).
Auto Trait Implementations§
impl Freeze for TrainingMonitor
impl RefUnwindSafe for TrainingMonitor
impl Send for TrainingMonitor
impl Sync for TrainingMonitor
impl Unpin for TrainingMonitor
impl UnsafeUnpin for TrainingMonitor
impl UnwindSafe for TrainingMonitor
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> 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