Struct dataflow::pipeline::ArrayBatch
source · pub struct ArrayBatch<const B: usize, T> { /* private fields */ }Expand description
Create batches from examples
Implementations
sourceimpl<const B: usize, T> ArrayBatch<B, T>
impl<const B: usize, T> ArrayBatch<B, T>
Trait Implementations
sourceimpl<const B: usize, T> Node for ArrayBatch<B, T>
impl<const B: usize, T> Node for ArrayBatch<B, T>
type Input = T
type Output = [T; B]
sourcefn process(&mut self, input: Vec<Self::Input>) -> Vec<Self::Output>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
fn process(&mut self, input: Vec<Self::Input>) -> Vec<Self::Output>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Process a batch of data
sourcefn data_remaining(&self, before: usize) -> usize
fn data_remaining(&self, before: usize) -> usize
Get number of examples left
fn add_node<N: Node<Input = Self::Output>>(self, node: N) -> Connector<Self, N>where
Self: Sized,
sourcefn add_batch_fn<O, F: Fn(Vec<Self::Output>) -> Vec<O>>(
self,
function: F
) -> Connector<Self, BatchStateless<Self::Output, O, F>>where
Self: Sized,
fn add_batch_fn<O, F: Fn(Vec<Self::Output>) -> Vec<O>>(
self,
function: F
) -> Connector<Self, BatchStateless<Self::Output, O, F>>where
Self: Sized,
Add function to pipeline
sourcefn add_fn<O, F: Fn(Self::Output) -> O + Send + Sync>(
self,
function: F
) -> Connector<Self, SingleStateless<Self::Output, O, F>>where
Self: Sized,
fn add_fn<O, F: Fn(Self::Output) -> O + Send + Sync>(
self,
function: F
) -> Connector<Self, SingleStateless<Self::Output, O, F>>where
Self: Sized,
Add function that takes a single datapoint and outputs a single datapoint
fn pair<O1, O2, N3: Node<Input = O1>, N4: Node<Input = O2>>(
self,
node1: N3,
node2: N4
) -> Connector<Self, Pair<N3, N4>>where
Self: Sized,
Self: Node<Output = (O1, O2)>,
Auto Trait Implementations
impl<const B: usize, T> RefUnwindSafe for ArrayBatch<B, T>where
T: RefUnwindSafe,
impl<const B: usize, T> Send for ArrayBatch<B, T>where
T: Send,
impl<const B: usize, T> Sync for ArrayBatch<B, T>where
T: Sync,
impl<const B: usize, T> Unpin for ArrayBatch<B, T>where
T: Unpin,
impl<const B: usize, T> UnwindSafe for ArrayBatch<B, T>where
T: UnwindSafe,
Blanket Implementations
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