pub struct Embedding { /* private fields */ }Expand description
Embedding layer: maps integer indices to dense vectors.
Weight has shape [vocab_size, embed_dim]. Input indices are 1D [seq_len]
(stored as f32, cast to usize internally). Output is [seq_len, embed_dim].
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Embedding
impl !RefUnwindSafe for Embedding
impl Send for Embedding
impl Sync for Embedding
impl Unpin for Embedding
impl UnsafeUnpin for Embedding
impl !UnwindSafe for Embedding
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