pub struct GoogleCloudAiplatformV1beta1SmoothGradConfig {
pub feature_noise_sigma: Option<GoogleCloudAiplatformV1beta1FeatureNoiseSigma>,
pub noise_sigma: Option<f32>,
pub noisy_sample_count: Option<i32>,
}Expand description
Config for SmoothGrad approximation of gradients. When enabled, the gradients are approximated by averaging the gradients from noisy samples in the vicinity of the inputs. Adding noise can help improve the computed gradients. Refer to this paper for more details: https://arxiv.org/pdf/1706.03825.pdf
This type is not used in any activity, and only used as part of another schema.
Fields§
§feature_noise_sigma: Option<GoogleCloudAiplatformV1beta1FeatureNoiseSigma>This is similar to 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 will be used for all features.
noise_sigma: Option<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 instead for each feature.
noisy_sample_count: Option<i32>The number of gradient samples to use for approximation. The higher this number, the more accurate the gradient is, but the runtime complexity increases by this factor as well. Valid range of its value is [1, 50]. Defaults to 3.
Trait Implementations§
Source§impl Clone for GoogleCloudAiplatformV1beta1SmoothGradConfig
impl Clone for GoogleCloudAiplatformV1beta1SmoothGradConfig
Source§fn clone(&self) -> GoogleCloudAiplatformV1beta1SmoothGradConfig
fn clone(&self) -> GoogleCloudAiplatformV1beta1SmoothGradConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for GoogleCloudAiplatformV1beta1SmoothGradConfig
impl Default for GoogleCloudAiplatformV1beta1SmoothGradConfig
Source§fn default() -> GoogleCloudAiplatformV1beta1SmoothGradConfig
fn default() -> GoogleCloudAiplatformV1beta1SmoothGradConfig
Source§impl<'de> Deserialize<'de> for GoogleCloudAiplatformV1beta1SmoothGradConfig
impl<'de> Deserialize<'de> for GoogleCloudAiplatformV1beta1SmoothGradConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Part for GoogleCloudAiplatformV1beta1SmoothGradConfig
Auto Trait Implementations§
impl Freeze for GoogleCloudAiplatformV1beta1SmoothGradConfig
impl RefUnwindSafe for GoogleCloudAiplatformV1beta1SmoothGradConfig
impl Send for GoogleCloudAiplatformV1beta1SmoothGradConfig
impl Sync for GoogleCloudAiplatformV1beta1SmoothGradConfig
impl Unpin for GoogleCloudAiplatformV1beta1SmoothGradConfig
impl UnwindSafe for GoogleCloudAiplatformV1beta1SmoothGradConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more