burn 0.3.0

BURN: Burn Unstoppable Rusty Neurons
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::module::{State, StateError};

#[derive(Debug)]
pub enum CheckpointerError {
    IOError(std::io::Error),
    StateError(StateError),
}

pub trait Checkpointer<E> {
    fn save(&self, epoch: usize, state: State<E>) -> Result<(), CheckpointerError>;
    fn restore(&self, epoch: usize) -> Result<State<E>, CheckpointerError>;
}