Class SmoothGradConfig.Builder (1.0.0)
Stay organized with collections
Save and categorize content based on your preferences.
publicstaticfinalclass SmoothGradConfig.BuilderextendsGeneratedMessageV3.Builder<SmoothGradConfig.Builder>implementsSmoothGradConfigOrBuilderConfig 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
Protobuf type google.cloud.vertexai.v1.SmoothGradConfig
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > SmoothGradConfig.BuilderImplements
SmoothGradConfigOrBuilderInherited Members
Static Methods
getDescriptor()
publicstaticfinalDescriptors.DescriptorgetDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
publicSmoothGradConfig.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
|
build()
publicSmoothGradConfigbuild()| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig |
|
buildPartial()
publicSmoothGradConfigbuildPartial()| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig |
|
clear()
publicSmoothGradConfig.Builderclear()| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
|
clearFeatureNoiseSigma()
publicSmoothGradConfig.BuilderclearFeatureNoiseSigma()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.
.google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2;
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
|
clearField(Descriptors.FieldDescriptor field)
publicSmoothGradConfig.BuilderclearField(Descriptors.FieldDescriptorfield)| Parameter | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
|
clearGradientNoiseSigma()
publicSmoothGradConfig.BuilderclearGradientNoiseSigma()| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
|
clearNoiseSigma()
publicSmoothGradConfig.BuilderclearNoiseSigma()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.
float noise_sigma = 1;
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
This builder for chaining. |
clearNoisySampleCount()
publicSmoothGradConfig.BuilderclearNoisySampleCount()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.
int32 noisy_sample_count = 3;
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
publicSmoothGradConfig.BuilderclearOneof(Descriptors.OneofDescriptoroneof)| Parameter | |
|---|---|
| Name | Description |
oneof |
OneofDescriptor |
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
|
clone()
publicSmoothGradConfig.Builderclone()| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
|
getDefaultInstanceForType()
publicSmoothGradConfiggetDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig |
|
getDescriptorForType()
publicDescriptors.DescriptorgetDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getFeatureNoiseSigma()
publicFeatureNoiseSigmagetFeatureNoiseSigma()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.
.google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2;
| Returns | |
|---|---|
| Type | Description |
FeatureNoiseSigma |
The featureNoiseSigma. |
getFeatureNoiseSigmaBuilder()
publicFeatureNoiseSigma.BuildergetFeatureNoiseSigmaBuilder()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.
.google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2;
| Returns | |
|---|---|
| Type | Description |
FeatureNoiseSigma.Builder |
|
getFeatureNoiseSigmaOrBuilder()
publicFeatureNoiseSigmaOrBuildergetFeatureNoiseSigmaOrBuilder()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.
.google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2;
| Returns | |
|---|---|
| Type | Description |
FeatureNoiseSigmaOrBuilder |
|
getGradientNoiseSigmaCase()
publicSmoothGradConfig.GradientNoiseSigmaCasegetGradientNoiseSigmaCase()| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.GradientNoiseSigmaCase |
|
getNoiseSigma()
publicfloatgetNoiseSigma()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.
float noise_sigma = 1;
| Returns | |
|---|---|
| Type | Description |
float |
The noiseSigma. |
getNoisySampleCount()
publicintgetNoisySampleCount()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.
int32 noisy_sample_count = 3;
| Returns | |
|---|---|
| Type | Description |
int |
The noisySampleCount. |
hasFeatureNoiseSigma()
publicbooleanhasFeatureNoiseSigma()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.
.google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the featureNoiseSigma field is set. |
hasNoiseSigma()
publicbooleanhasNoiseSigma()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.
float noise_sigma = 1;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the noiseSigma field is set. |
internalGetFieldAccessorTable()
protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
publicfinalbooleanisInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFeatureNoiseSigma(FeatureNoiseSigma value)
publicSmoothGradConfig.BuildermergeFeatureNoiseSigma(FeatureNoiseSigmavalue)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.
.google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
FeatureNoiseSigma |
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
|
mergeFrom(SmoothGradConfig other)
publicSmoothGradConfig.BuildermergeFrom(SmoothGradConfigother)| Parameter | |
|---|---|
| Name | Description |
other |
SmoothGradConfig |
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
publicSmoothGradConfig.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
publicSmoothGradConfig.BuildermergeFrom(Messageother)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
|
mergeUnknownFields(UnknownFieldSet unknownFields)
publicfinalSmoothGradConfig.BuildermergeUnknownFields(UnknownFieldSetunknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
|
setFeatureNoiseSigma(FeatureNoiseSigma value)
publicSmoothGradConfig.BuildersetFeatureNoiseSigma(FeatureNoiseSigmavalue)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.
.google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
FeatureNoiseSigma |
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
|
setFeatureNoiseSigma(FeatureNoiseSigma.Builder builderForValue)
publicSmoothGradConfig.BuildersetFeatureNoiseSigma(FeatureNoiseSigma.BuilderbuilderForValue)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.
.google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
FeatureNoiseSigma.Builder |
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
|
setField(Descriptors.FieldDescriptor field, Object value)
publicSmoothGradConfig.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
|
setNoiseSigma(float value)
publicSmoothGradConfig.BuildersetNoiseSigma(floatvalue)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.
float noise_sigma = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
float The noiseSigma to set. |
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
This builder for chaining. |
setNoisySampleCount(int value)
publicSmoothGradConfig.BuildersetNoisySampleCount(intvalue)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.
int32 noisy_sample_count = 3;
| Parameter | |
|---|---|
| Name | Description |
value |
int The noisySampleCount to set. |
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
publicSmoothGradConfig.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
|
setUnknownFields(UnknownFieldSet unknownFields)
publicfinalSmoothGradConfig.BuildersetUnknownFields(UnknownFieldSetunknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
SmoothGradConfig.Builder |
|