pub struct PointerGrad {
pub w1: Vec<f64>,
pub w2: Vec<f64>,
pub v: Vec<f64>,
}Expand description
Gradients of the teacher-forced NLL with respect to the attention parameters.
Only the attention head (w1, w2, v) is differentiated here; the encoder
parameters are exercised by PointerNetwork::encode but treated as fixed
feature extractors for the gradient check.
Fields§
§w1: Vec<f64>Gradient w.r.t. w1.
w2: Vec<f64>Gradient w.r.t. w2.
v: Vec<f64>Gradient w.r.t. v.
Trait Implementations§
Source§impl Clone for PointerGrad
impl Clone for PointerGrad
Source§fn clone(&self) -> PointerGrad
fn clone(&self) -> PointerGrad
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 PointerGrad
impl RefUnwindSafe for PointerGrad
impl Send for PointerGrad
impl Sync for PointerGrad
impl Unpin for PointerGrad
impl UnsafeUnpin for PointerGrad
impl UnwindSafe for PointerGrad
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