pub struct NeuralOutput {
pub values: Vec<f64>,
pub labels: Vec<String>,
}Expand description
Neural network output with probability distribution over labels.
Fields§
§values: Vec<f64>Softmax probability values (should sum to ~1.0)
labels: Vec<String>Corresponding label names (strings or integer representations)
Implementations§
Source§impl NeuralOutput
impl NeuralOutput
Sourcepub fn with_integer_labels(values: Vec<f64>, labels: Vec<i64>) -> Self
pub fn with_integer_labels(values: Vec<f64>, labels: Vec<i64>) -> Self
Create output with integer labels converted to strings.
Sourcepub fn num_classes(&self) -> usize
pub fn num_classes(&self) -> usize
Number of classes/labels.
Trait Implementations§
Source§impl Clone for NeuralOutput
impl Clone for NeuralOutput
Source§fn clone(&self) -> NeuralOutput
fn clone(&self) -> NeuralOutput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NeuralOutput
impl RefUnwindSafe for NeuralOutput
impl Send for NeuralOutput
impl Sync for NeuralOutput
impl Unpin for NeuralOutput
impl UnsafeUnpin for NeuralOutput
impl UnwindSafe for NeuralOutput
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