pub struct TokenizedInput {
pub input_ids: Vec<usize>,
pub attention_mask: Vec<f32>,
pub token_type_ids: Option<Vec<usize>>,
pub position_ids: Option<Vec<usize>>,
}Expand description
Tokenized input representation
Fields§
§input_ids: Vec<usize>Token IDs
attention_mask: Vec<f32>Attention mask
token_type_ids: Option<Vec<usize>>Token type IDs (for BERT-style models)
position_ids: Option<Vec<usize>>Position IDs
Trait Implementations§
Source§impl Clone for TokenizedInput
impl Clone for TokenizedInput
Source§fn clone(&self) -> TokenizedInput
fn clone(&self) -> TokenizedInput
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 TokenizedInput
impl RefUnwindSafe for TokenizedInput
impl Send for TokenizedInput
impl Sync for TokenizedInput
impl Unpin for TokenizedInput
impl UnwindSafe for TokenizedInput
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