pub struct TensorBoardLogger { /* private fields */ }Expand description
TensorBoard logger that writes real event files.
Writes TensorBoard event files in the tfevents format, which can be visualized using TensorBoard.
§Example
use tensorlogic_train::TensorBoardLogger;
use tensorlogic_train::LoggingBackend;
let mut logger = TensorBoardLogger::new("./logs/run1").unwrap();
logger.log_scalar("loss", 0.5, 1).unwrap();
logger.log_scalar("accuracy", 0.95, 1).unwrap();
logger.flush().unwrap();Implementations§
Source§impl TensorBoardLogger
impl TensorBoardLogger
Sourcepub fn new<P: AsRef<Path>>(log_dir: P) -> TrainResult<Self>
pub fn new<P: AsRef<Path>>(log_dir: P) -> TrainResult<Self>
Sourcepub fn log_histogram(
&mut self,
tag: &str,
values: &[f64],
step: usize,
) -> TrainResult<()>
pub fn log_histogram( &mut self, tag: &str, values: &[f64], step: usize, ) -> TrainResult<()>
Log a histogram (weight distributions).
Trait Implementations§
Source§impl Debug for TensorBoardLogger
impl Debug for TensorBoardLogger
Source§impl LoggingBackend for TensorBoardLogger
impl LoggingBackend for TensorBoardLogger
Auto Trait Implementations§
impl Freeze for TensorBoardLogger
impl RefUnwindSafe for TensorBoardLogger
impl Send for TensorBoardLogger
impl Sync for TensorBoardLogger
impl Unpin for TensorBoardLogger
impl UnwindSafe for TensorBoardLogger
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> 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