pub struct EvaluationResult {
pub loss: f32,
pub perplexity: f32,
pub accuracy: f64,
pub num_batches: usize,
pub total_tokens: usize,
}Expand description
Result of evaluating a model on held-out sequences.
Fields§
§loss: f32Average cross-entropy loss across all batches.
perplexity: f32Perplexity = exp(average_loss).
accuracy: f64Fraction of tokens where argmax(logits) == target (next-token accuracy).
num_batches: usizeNumber of batches evaluated.
total_tokens: usizeTotal number of (unmasked) tokens evaluated.
Trait Implementations§
Source§impl Clone for EvaluationResult
impl Clone for EvaluationResult
Source§fn clone(&self) -> EvaluationResult
fn clone(&self) -> EvaluationResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EvaluationResult
impl RefUnwindSafe for EvaluationResult
impl Send for EvaluationResult
impl Sync for EvaluationResult
impl Unpin for EvaluationResult
impl UnsafeUnpin for EvaluationResult
impl UnwindSafe for EvaluationResult
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