pub struct OutputRequest {
pub all_logits: Option<Vec<f32>>,
pub embeddings: Option<Vec<f32>>,
}
Expand description
Used in a call to Model::evaluate or InferenceSession::infer to request
information from the model. If a value is set to Some
, the Vec
will be
cleared, resized, and filled with the related data.
Fields§
§all_logits: Option<Vec<f32>>
Returns all the logits for evaluation. A logit represents the likelihood
that a given token will be generated based on the tokens that have been
evaluated or generated so far. Output shape is n_batch * n_vocab
.
embeddings: Option<Vec<f32>>
Returns all the embeddings for an evaluation. An embedding is a vector
that measures the relatedness of text strings. Output shape is
n_batch * n_embd
.
Trait Implementations§
Source§impl Clone for OutputRequest
impl Clone for OutputRequest
Source§fn clone(&self) -> OutputRequest
fn clone(&self) -> OutputRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OutputRequest
impl Debug for OutputRequest
Source§impl Default for OutputRequest
impl Default for OutputRequest
Source§fn default() -> OutputRequest
fn default() -> OutputRequest
Returns the “default value” for a type. Read more
Source§impl PartialEq for OutputRequest
impl PartialEq for OutputRequest
impl StructuralPartialEq for OutputRequest
Auto Trait Implementations§
impl Freeze for OutputRequest
impl RefUnwindSafe for OutputRequest
impl Send for OutputRequest
impl Sync for OutputRequest
impl Unpin for OutputRequest
impl UnwindSafe for OutputRequest
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