pub struct AbstractLengthsGradientOp<T, TLengths, Context, ReducerGradient, const GradientNeedIndices: bool> { /* private fields */ }
Expand description
| Some notice: | | 1. Gradient actually doesn’t depend | on whether sparse lookup is fused or | not | | 2. INDICES are not used in CPU version, | but they are needed in async CUDA version. | So we register 3 input version for CPU | as gradient op for | | GPU/CPU convert. We then register 2 | input version for CPU for backward compatibility | with older nets. | | bool GradientNeedIndices = false> |
Implementations§
source§impl<T, TLengths, Context, ReducerGradient, const GradientNeedIndices: bool> AbstractLengthsGradientOp<T, TLengths, Context, ReducerGradient, GradientNeedIndices>
impl<T, TLengths, Context, ReducerGradient, const GradientNeedIndices: bool> AbstractLengthsGradientOp<T, TLengths, Context, ReducerGradient, GradientNeedIndices>
pub fn run_on_device(&mut self) -> bool
pub fn do_run_with_value<const FixedSize: i32>(&mut self) -> bool
Auto Trait Implementations§
impl<T, TLengths, Context, ReducerGradient, const GradientNeedIndices: bool> !RefUnwindSafe for AbstractLengthsGradientOp<T, TLengths, Context, ReducerGradient, GradientNeedIndices>
impl<T, TLengths, Context, ReducerGradient, const GradientNeedIndices: bool> !Send for AbstractLengthsGradientOp<T, TLengths, Context, ReducerGradient, GradientNeedIndices>
impl<T, TLengths, Context, ReducerGradient, const GradientNeedIndices: bool> !Sync for AbstractLengthsGradientOp<T, TLengths, Context, ReducerGradient, GradientNeedIndices>
impl<T, TLengths, Context, ReducerGradient, const GradientNeedIndices: bool> Unpin for AbstractLengthsGradientOp<T, TLengths, Context, ReducerGradient, GradientNeedIndices>where Context: Unpin, ReducerGradient: Unpin, T: Unpin, TLengths: Unpin,
impl<T, TLengths, Context, ReducerGradient, const GradientNeedIndices: bool> !UnwindSafe for AbstractLengthsGradientOp<T, TLengths, Context, ReducerGradient, GradientNeedIndices>
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.