pub struct LossWithGradients {
pub loss: f64,
pub gradients: Float32Array,
}Expand description
Loss computation result with gradients
Fields§
§loss: f64§gradients: Float32ArrayTrait Implementations§
Source§impl FromNapiValue for LossWithGradients
impl FromNapiValue for LossWithGradients
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 LossWithGradients
impl ToNapiValue for LossWithGradients
Source§unsafe fn to_napi_value(
env: napi_env,
val: LossWithGradients,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: LossWithGradients, ) -> Result<napi_value>
Safety Read more
Source§impl TypeName for LossWithGradients
impl TypeName for LossWithGradients
Source§impl ValidateNapiValue for LossWithGradients
impl ValidateNapiValue for LossWithGradients
Source§unsafe fn validate(
env: *mut napi_env__,
napi_val: *mut napi_value__,
) -> Result<*mut napi_value__, Error>
unsafe fn validate( env: *mut napi_env__, napi_val: *mut napi_value__, ) -> Result<*mut napi_value__, Error>
Safety Read more
Auto Trait Implementations§
impl Freeze for LossWithGradients
impl !RefUnwindSafe for LossWithGradients
impl Send for LossWithGradients
impl !Sync for LossWithGradients
impl Unpin for LossWithGradients
impl UnsafeUnpin for LossWithGradients
impl !UnwindSafe for LossWithGradients
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