/// <summary> /// Return the boolean based training parameter. /// </summary> /// <param name="key">Specifies the key of the value to get.</param> /// <returns>The boolean based value is returned.</returns> public bool GetTrainingParameter(OrtTrainingBooleanParameter key) { UIntPtr val = UIntPtr.Zero; NativeApiStatus.VerifySuccess(NativeMethodsTraining.OrtGetParameter_bool(_nativeHandle, key, out val)); if ((ulong)val == 0) { return(false); } else { return(true); } }
/// <summary> /// Set the boolean based training parameters. /// </summary> /// <param name="key">Specifies the key of the value to set.</param> /// <param name="bVal">Specifies the value to be set.</param> public void SetTrainingParameter(OrtTrainingBooleanParameter key, bool bVal) { NativeApiStatus.VerifySuccess(NativeMethodsTraining.OrtSetParameter_bool(_nativeHandle, key, bVal)); }