pub struct TwoWayBlockOutput {
pub tokens: Vec<f32>,
pub image: Vec<f32>,
pub self_weights: Vec<f32>,
pub token_to_image_weights: Vec<f32>,
pub image_to_token_weights: Vec<f32>,
}Expand description
Output of a TwoWayAttentionBlock forward pass.
Fields§
§tokens: Vec<f32>Updated token embeddings [n_tokens · e].
image: Vec<f32>Updated image embeddings [n_image · e].
self_weights: Vec<f32>Token self-attention weights [n_heads · n_tokens · n_tokens].
token_to_image_weights: Vec<f32>Token→image cross-attention weights [n_heads · n_tokens · n_image].
image_to_token_weights: Vec<f32>Image→token cross-attention weights [n_heads · n_image · n_tokens].
Trait Implementations§
Source§impl Clone for TwoWayBlockOutput
impl Clone for TwoWayBlockOutput
Source§fn clone(&self) -> TwoWayBlockOutput
fn clone(&self) -> TwoWayBlockOutput
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 TwoWayBlockOutput
impl RefUnwindSafe for TwoWayBlockOutput
impl Send for TwoWayBlockOutput
impl Sync for TwoWayBlockOutput
impl Unpin for TwoWayBlockOutput
impl UnsafeUnpin for TwoWayBlockOutput
impl UnwindSafe for TwoWayBlockOutput
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