pub struct BatchProvider { /* private fields */ }Expand description
A batch of input feature sets for bulk prediction.
Wraps MLArrayBatchProvider to collect multiple input sets that can
be submitted to Model::predict_batch in a single call.
§Example
ⓘ
let inputs_0: &[(&str, &dyn AsMultiArray)] = &[("x", &tensor_a)];
let inputs_1: &[(&str, &dyn AsMultiArray)] = &[("x", &tensor_b)];
let batch = BatchProvider::new(&[&inputs_0[..], &inputs_1[..]])?;
assert_eq!(batch.count(), 2);Implementations§
Source§impl BatchProvider
impl BatchProvider
Trait Implementations§
Source§impl Debug for BatchProvider
Available on Apple only.
impl Debug for BatchProvider
Available on Apple only.
impl Send for BatchProvider
Available on Apple only.
Auto Trait Implementations§
impl Freeze for BatchProvider
impl !RefUnwindSafe for BatchProvider
impl !Sync for BatchProvider
impl Unpin for BatchProvider
impl UnsafeUnpin for BatchProvider
impl !UnwindSafe for BatchProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more