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§
Sourcetype LayerState: RuntimeLayerState<B>
type LayerState: RuntimeLayerState<B>
Concrete monomorphized layer state used by the architecture.
Required Methods§
Sourcefn layer(&mut self, layer: usize) -> Result<&mut Self::LayerState, StateError>
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".