Enum google_api_proto::google::cloud::aiplatform::v1beta1::smooth_grad_config::GradientNoiseSigma
source · pub enum GradientNoiseSigma {
NoiseSigma(f32),
FeatureNoiseSigma(FeatureNoiseSigma),
}
Expand description
Represents the standard deviation of the gaussian kernel that will be used to add noise to the interpolated inputs prior to computing gradients.
Variants§
NoiseSigma(f32)
This is a single float value and will be used to add noise to all the features. Use this field when all features are normalized to have the same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where features are normalized to have 0-mean and 1-variance. Learn more about normalization.
For best results the recommended value is about 10% - 20% of the standard deviation of the input feature. Refer to section 3.2 of the SmoothGrad paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1.
If the distribution is different per feature, set [feature_noise_sigma][google.cloud.aiplatform.v1beta1.SmoothGradConfig.feature_noise_sigma] instead for each feature.
FeatureNoiseSigma(FeatureNoiseSigma)
This is similar to [noise_sigma][google.cloud.aiplatform.v1beta1.SmoothGradConfig.noise_sigma], but provides additional flexibility. A separate noise sigma can be provided for each feature, which is useful if their distributions are different. No noise is added to features that are not set. If this field is unset, [noise_sigma][google.cloud.aiplatform.v1beta1.SmoothGradConfig.noise_sigma] will be used for all features.
Implementations§
source§impl GradientNoiseSigma
impl GradientNoiseSigma
sourcepub fn merge(
field: &mut Option<GradientNoiseSigma>,
tag: u32,
wire_type: WireType,
buf: &mut impl Buf,
ctx: DecodeContext,
) -> Result<(), DecodeError>
pub fn merge( field: &mut Option<GradientNoiseSigma>, tag: u32, wire_type: WireType, buf: &mut impl Buf, ctx: DecodeContext, ) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into self.
sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
source§impl Clone for GradientNoiseSigma
impl Clone for GradientNoiseSigma
source§fn clone(&self) -> GradientNoiseSigma
fn clone(&self) -> GradientNoiseSigma
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GradientNoiseSigma
impl Debug for GradientNoiseSigma
source§impl PartialEq for GradientNoiseSigma
impl PartialEq for GradientNoiseSigma
source§fn eq(&self, other: &GradientNoiseSigma) -> bool
fn eq(&self, other: &GradientNoiseSigma) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for GradientNoiseSigma
Auto Trait Implementations§
impl Freeze for GradientNoiseSigma
impl RefUnwindSafe for GradientNoiseSigma
impl Send for GradientNoiseSigma
impl Sync for GradientNoiseSigma
impl Unpin for GradientNoiseSigma
impl UnwindSafe for GradientNoiseSigma
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request