Struct nncombinator::layer::InputLayer
source · [−]pub struct InputLayer<U, O, LI>where
U: UnitValue<U>,{ /* private fields */ }Implementations
sourceimpl<U, O, LI> InputLayer<U, O, LI>where
U: UnitValue<U>,
impl<U, O, LI> InputLayer<U, O, LI>where
U: UnitValue<U>,
pub fn new() -> InputLayer<U, O, LI>
Trait Implementations
sourceimpl<U, O, LI> BackwardAll<U> for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
impl<U, O, LI> BackwardAll<U> for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
type LossInput = LI
fn backward_all<OP: Optimizer<U>, L: LossFunction<U>>(
&mut self,
_: Self::LossInput,
_: Self::OutStack,
_: &mut OP,
_: &L
) -> Result<(), TrainingError>
fn is_canonical_link<L: LossFunction<U>>(&self, _: &L) -> bool
sourceimpl<U, O, LI> BatchBackward<U> for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
impl<U, O, LI> BatchBackward<U> for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
type BatchLossInput = VecArr<U, LI>
fn batch_backward<OP: Optimizer<U>, L: LossFunction<U>>(
&mut self,
_: Self::BatchLossInput,
_: Self::BatchOutStack,
_: &mut OP,
_: &L
) -> Result<(), TrainingError>
sourceimpl<U, O, LI> BatchForward for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
impl<U, O, LI> BatchForward for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
fn batch_forward(
&self,
input: Self::BatchInput
) -> Result<Self::BatchOutput, TrainingError>
sourceimpl<U, O, LI> BatchForwardBase for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
impl<U, O, LI> BatchForwardBase for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
type BatchInput = VecArr<U, O>
type BatchOutput = VecArr<U, O>
sourceimpl<U, O, LI> BatchLoss<U> for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
impl<U, O, LI> BatchLoss<U> for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
fn batch_loss<L: LossFunction<U>>(
&self,
loss: Self::BatchLossInput,
_: &L,
stack: Self::BatchOutStack
) -> Result<(Self::BatchOutStack, Self::BatchLossInput), TrainingError>
sourceimpl<U, O, LI> BatchPreTrain<U> for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
impl<U, O, LI> BatchPreTrain<U> for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
fn batch_pre_train(
&self,
input: Self::BatchInput
) -> Result<Self::BatchOutStack, TrainingError>
sourceimpl<U, O, LI> BatchPreTrainBase<U> for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
impl<U, O, LI> BatchPreTrainBase<U> for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
type BatchOutStack = Cons<Nil, VecArr<U, O>>
sourceimpl<U, O, LI> ForwardAll for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
impl<U, O, LI> ForwardAll for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
type Input = O
type Output = O
fn forward_all(&self, input: Self::Input) -> Result<Self::Output, EvaluateError>
sourceimpl<U, O, LI> Loss<U> for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
impl<U, O, LI> Loss<U> for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
fn loss<L: LossFunction<U>>(
&mut self,
loss: Self::LossInput,
_: &L,
stack: Self::OutStack
) -> Result<(Self::OutStack, Self::LossInput), TrainingError>
sourceimpl<T, U, O, LI> Persistence<U, T, Linear> for InputLayer<U, O, LI>where
T: LinearPersistence<U>,
U: UnitValue<U>,
impl<T, U, O, LI> Persistence<U, T, Linear> for InputLayer<U, O, LI>where
T: LinearPersistence<U>,
U: UnitValue<U>,
sourceimpl<U, O, LI> Persistence<U, TextFilePersistence<U>, Specialized> for InputLayer<U, O, LI>where
U: UnitValue<U> + FromStr + Sized,
impl<U, O, LI> Persistence<U, TextFilePersistence<U>, Specialized> for InputLayer<U, O, LI>where
U: UnitValue<U> + FromStr + Sized,
fn load(&mut self, _: &mut TextFilePersistence<U>) -> Result<(), ConfigReadError>
fn save(
&mut self,
_: &mut TextFilePersistence<U>
) -> Result<(), PersistenceError>
sourceimpl<U, O, LI> PreTrain<U> for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
impl<U, O, LI> PreTrain<U> for InputLayer<U, O, LI>where
U: UnitValue<U>,
O: Debug + Send + Sync + 'static,
LI: Debug,
type OutStack = Cons<Nil, <InputLayer<U, O, LI> as ForwardAll>::Output>
fn pre_train(&self, input: Self::Input) -> Result<Self::OutStack, EvaluateError>
Auto Trait Implementations
impl<U, O, LI> RefUnwindSafe for InputLayer<U, O, LI>where
LI: RefUnwindSafe,
O: RefUnwindSafe,
U: RefUnwindSafe,
impl<U, O, LI> Send for InputLayer<U, O, LI>where
LI: Send,
O: Send,
impl<U, O, LI> Sync for InputLayer<U, O, LI>where
LI: Sync,
O: Sync,
impl<U, O, LI> Unpin for InputLayer<U, O, LI>where
LI: Unpin,
O: Unpin,
U: Unpin,
impl<U, O, LI> UnwindSafe for InputLayer<U, O, LI>where
LI: UnwindSafe,
O: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
sourceimpl<T> AddLayer for Twhere
T: ForwardAll,
impl<T> AddLayer for Twhere
T: ForwardAll,
fn add_layer<C, F>(self, f: F) -> Cwhere
C: ForwardAll,
F: FnOnce(T) -> C,
sourceimpl<T, U> AddLayerTrain<U> for Twhere
T: PreTrain<U>,
U: UnitValue<U>,
impl<T, U> AddLayerTrain<U> for Twhere
T: PreTrain<U>,
U: UnitValue<U>,
fn add_layer_train<C, F>(self, f: F) -> Cwhere
C: Train<U>,
F: FnOnce(T) -> C,
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more