Skip to main content

RuntimeLayerState

Trait RuntimeLayerState 

Source
pub trait RuntimeLayerState<B: NeuralBackend> {
    type RetainedValues<'a>: Iterator<Item = &'a B::Tensor>
       where Self: 'a,
             B::Tensor: 'a;

    // Required method
    fn retained_values(&self) -> Self::RetainedValues<'_>;
}
Expand description

Concrete layer state capable of exposing backend-native retained tensors.

Required Associated Types§

Source

type RetainedValues<'a>: Iterator<Item = &'a B::Tensor> where Self: 'a, B::Tensor: 'a

Allocation-free iterator returned for one layer.

Required Methods§

Source

fn retained_values(&self) -> Self::RetainedValues<'_>

Borrows tensors that must remain alive through this layer’s submission.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§