pub struct SpectralRegularization { /* private fields */ }Expand description
Spectral regularization for smooth representations
Implementations§
Source§impl SpectralRegularization
impl SpectralRegularization
pub fn into_reference( val: SpectralRegularization, env: Env, ) -> Result<Reference<SpectralRegularization>>
pub fn into_instance( self, env: Env, ) -> Result<ClassInstance<SpectralRegularization>>
Source§impl SpectralRegularization
impl SpectralRegularization
Sourcepub fn compute_batch(&self, embeddings: Vec<Float32Array>) -> f64
pub fn compute_batch(&self, embeddings: Vec<Float32Array>) -> f64
Compute spectral regularization for a batch of embeddings
Trait Implementations§
Source§impl FromNapiMutRef for SpectralRegularization
impl FromNapiMutRef for SpectralRegularization
Source§unsafe fn from_napi_mut_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static mut Self>
unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static mut Self>
Safety Read more
Source§impl FromNapiRef for SpectralRegularization
impl FromNapiRef for SpectralRegularization
Source§unsafe fn from_napi_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static Self>
unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static Self>
Safety Read more
Source§impl FromNapiValue for &SpectralRegularization
impl FromNapiValue for &SpectralRegularization
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl FromNapiValue for &mut SpectralRegularization
impl FromNapiValue for &mut SpectralRegularization
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ToNapiValue for SpectralRegularization
impl ToNapiValue for SpectralRegularization
Source§unsafe fn to_napi_value(
env: napi_env,
val: SpectralRegularization,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: SpectralRegularization, ) -> Result<napi_value>
Safety Read more
Source§impl TypeName for &SpectralRegularization
impl TypeName for &SpectralRegularization
Source§impl TypeName for &mut SpectralRegularization
impl TypeName for &mut SpectralRegularization
Source§impl TypeName for SpectralRegularization
impl TypeName for SpectralRegularization
Source§impl ValidateNapiValue for &SpectralRegularization
impl ValidateNapiValue for &SpectralRegularization
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &mut SpectralRegularization
impl ValidateNapiValue for &mut SpectralRegularization
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Auto Trait Implementations§
impl Freeze for SpectralRegularization
impl RefUnwindSafe for SpectralRegularization
impl Send for SpectralRegularization
impl Sync for SpectralRegularization
impl Unpin for SpectralRegularization
impl UnsafeUnpin for SpectralRegularization
impl UnwindSafe for SpectralRegularization
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