Skip to main content

ResettableRuntimeLayerState

Trait ResettableRuntimeLayerState 

Source
pub trait ResettableRuntimeLayerState<B: NeuralBackend>: RuntimeLayerState<B> {
    // Required method
    fn reset(&mut self) -> Result<(), StateError>;
}
Expand description

Reset capability for one concrete backend-native layer state.

Reset drops the semantic contents of the layer state without replacing its concrete cache type or inspecting backend-native values on the host.

Required Methods§

Source

fn reset(&mut self) -> Result<(), StateError>

Clears this layer state to its initial empty value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§