pub struct TokenScore {
pub logprob: f64,
pub greedy: bool,
}Expand description
One teacher-forced position of Pipeline::score_ids_device: the
target’s natural-log probability and whether it is the argmax (the
first maximum on ties, as torch’s argmax).
Fields§
§logprob: f64§greedy: boolTrait Implementations§
Source§impl Clone for TokenScore
impl Clone for TokenScore
impl Copy for TokenScore
Source§impl Debug for TokenScore
impl Debug for TokenScore
Source§impl PartialEq for TokenScore
impl PartialEq for TokenScore
impl StructuralPartialEq for TokenScore
Auto Trait Implementations§
impl Forget for TokenScore
impl Freeze for TokenScore
impl Move for TokenScore
impl RefUnwindSafe for TokenScore
impl Send for TokenScore
impl Sync for TokenScore
impl Unpin for TokenScore
impl UnsafeUnpin for TokenScore
impl UnwindSafe for TokenScore
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