Skip to main content

LayerRuntimeState

Trait LayerRuntimeState 

Source
pub trait LayerRuntimeState<B: NeuralBackend>: RuntimeState<B> {
    type LayerState: RuntimeLayerState<B>;

    // Required method
    fn layer(
        &mut self,
        layer: usize,
    ) -> Result<&mut Self::LayerState, StateError>;
}
Expand description

Optional capability for architectures with one indexed state per layer.

Required Associated Types§

Source

type LayerState: RuntimeLayerState<B>

Concrete monomorphized layer state used by the architecture.

Required Methods§

Source

fn layer(&mut self, layer: usize) -> Result<&mut Self::LayerState, StateError>

Mutably borrows one architecture-global layer state.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§