pub struct LearnedProjection {
pub input_dim: usize,
pub grid_size: usize,
pub w1: Vec<f32>,
pub w2: Vec<f32>,
}Expand description
Learned toroidal projection parameters.
Implements φ_θ(e) = (σ(W₁e) mod 1, σ(W₂e) mod 1) where σ is sigmoid and e is an embedding vector.
Note: Only available with std feature due to Vec usage.
Fields§
§input_dim: usizeInput dimension
grid_size: usizeGrid size for output
w1: Vec<f32>Weight matrix W1 (flattened, grid_size elements)
w2: Vec<f32>Weight matrix W2 (flattened, grid_size elements)
Implementations§
Trait Implementations§
Source§impl Clone for LearnedProjection
impl Clone for LearnedProjection
Source§fn clone(&self) -> LearnedProjection
fn clone(&self) -> LearnedProjection
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 LearnedProjection
impl RefUnwindSafe for LearnedProjection
impl Send for LearnedProjection
impl Sync for LearnedProjection
impl Unpin for LearnedProjection
impl UnsafeUnpin for LearnedProjection
impl UnwindSafe for LearnedProjection
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