Package com.google.cloud.aiplatform.v1
Class SmoothGradConfig.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
- com.google.cloud.aiplatform.v1.SmoothGradConfig.Builder
-
- All Implemented Interfaces:
SmoothGradConfigOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- SmoothGradConfig
public static final class SmoothGradConfig.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder> implements SmoothGradConfigOrBuilder
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
Protobuf typegoogle.cloud.aiplatform.v1.SmoothGradConfig
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SmoothGradConfig.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)SmoothGradConfigbuild()SmoothGradConfigbuildPartial()SmoothGradConfig.Builderclear()SmoothGradConfig.BuilderclearFeatureNoiseSigma()This is similar to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], but provides additional flexibility.SmoothGradConfig.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)SmoothGradConfig.BuilderclearGradientNoiseSigma()SmoothGradConfig.BuilderclearNoiseSigma()This is a single float value and will be used to add noise to all the features.SmoothGradConfig.BuilderclearNoisySampleCount()The number of gradient samples to use for approximation.SmoothGradConfig.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)SmoothGradConfig.Builderclone()SmoothGradConfiggetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()FeatureNoiseSigmagetFeatureNoiseSigma()This is similar to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], but provides additional flexibility.FeatureNoiseSigma.BuildergetFeatureNoiseSigmaBuilder()This is similar to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], but provides additional flexibility.FeatureNoiseSigmaOrBuildergetFeatureNoiseSigmaOrBuilder()This is similar to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], but provides additional flexibility.SmoothGradConfig.GradientNoiseSigmaCasegetGradientNoiseSigmaCase()floatgetNoiseSigma()This is a single float value and will be used to add noise to all the features.intgetNoisySampleCount()The number of gradient samples to use for approximation.booleanhasFeatureNoiseSigma()This is similar to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], but provides additional flexibility.booleanhasNoiseSigma()This is a single float value and will be used to add noise to all the features.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()SmoothGradConfig.BuildermergeFeatureNoiseSigma(FeatureNoiseSigma value)This is similar to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], but provides additional flexibility.SmoothGradConfig.BuildermergeFrom(SmoothGradConfig other)SmoothGradConfig.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)SmoothGradConfig.BuildermergeFrom(com.google.protobuf.Message other)SmoothGradConfig.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)SmoothGradConfig.BuildersetFeatureNoiseSigma(FeatureNoiseSigma value)This is similar to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], but provides additional flexibility.SmoothGradConfig.BuildersetFeatureNoiseSigma(FeatureNoiseSigma.Builder builderForValue)This is similar to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], but provides additional flexibility.SmoothGradConfig.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)SmoothGradConfig.BuildersetNoiseSigma(float value)This is a single float value and will be used to add noise to all the features.SmoothGradConfig.BuildersetNoisySampleCount(int value)The number of gradient samples to use for approximation.SmoothGradConfig.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)SmoothGradConfig.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
clear
public SmoothGradConfig.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
getDefaultInstanceForType
public SmoothGradConfig getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public SmoothGradConfig build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public SmoothGradConfig buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public SmoothGradConfig.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
setField
public SmoothGradConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
clearField
public SmoothGradConfig.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
clearOneof
public SmoothGradConfig.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
setRepeatedField
public SmoothGradConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
addRepeatedField
public SmoothGradConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
mergeFrom
public SmoothGradConfig.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SmoothGradConfig.Builder>
-
mergeFrom
public SmoothGradConfig.Builder mergeFrom(SmoothGradConfig other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
mergeFrom
public SmoothGradConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SmoothGradConfig.Builder>- Throws:
IOException
-
getGradientNoiseSigmaCase
public SmoothGradConfig.GradientNoiseSigmaCase getGradientNoiseSigmaCase()
- Specified by:
getGradientNoiseSigmaCasein interfaceSmoothGradConfigOrBuilder
-
clearGradientNoiseSigma
public SmoothGradConfig.Builder clearGradientNoiseSigma()
-
hasNoiseSigma
public boolean hasNoiseSigma()
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](https://developers.google.com/machine-learning/data-prep/transform/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.v1.SmoothGradConfig.feature_noise_sigma] instead for each feature.
float noise_sigma = 1;- Specified by:
hasNoiseSigmain interfaceSmoothGradConfigOrBuilder- Returns:
- Whether the noiseSigma field is set.
-
getNoiseSigma
public float getNoiseSigma()
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](https://developers.google.com/machine-learning/data-prep/transform/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.v1.SmoothGradConfig.feature_noise_sigma] instead for each feature.
float noise_sigma = 1;- Specified by:
getNoiseSigmain interfaceSmoothGradConfigOrBuilder- Returns:
- The noiseSigma.
-
setNoiseSigma
public SmoothGradConfig.Builder setNoiseSigma(float value)
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](https://developers.google.com/machine-learning/data-prep/transform/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.v1.SmoothGradConfig.feature_noise_sigma] instead for each feature.
float noise_sigma = 1;- Parameters:
value- The noiseSigma to set.- Returns:
- This builder for chaining.
-
clearNoiseSigma
public SmoothGradConfig.Builder clearNoiseSigma()
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](https://developers.google.com/machine-learning/data-prep/transform/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.v1.SmoothGradConfig.feature_noise_sigma] instead for each feature.
float noise_sigma = 1;- Returns:
- This builder for chaining.
-
hasFeatureNoiseSigma
public boolean hasFeatureNoiseSigma()
This is similar to [noise_sigma][google.cloud.aiplatform.v1.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.v1.SmoothGradConfig.noise_sigma] will be used for all features.
.google.cloud.aiplatform.v1.FeatureNoiseSigma feature_noise_sigma = 2;- Specified by:
hasFeatureNoiseSigmain interfaceSmoothGradConfigOrBuilder- Returns:
- Whether the featureNoiseSigma field is set.
-
getFeatureNoiseSigma
public FeatureNoiseSigma getFeatureNoiseSigma()
This is similar to [noise_sigma][google.cloud.aiplatform.v1.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.v1.SmoothGradConfig.noise_sigma] will be used for all features.
.google.cloud.aiplatform.v1.FeatureNoiseSigma feature_noise_sigma = 2;- Specified by:
getFeatureNoiseSigmain interfaceSmoothGradConfigOrBuilder- Returns:
- The featureNoiseSigma.
-
setFeatureNoiseSigma
public SmoothGradConfig.Builder setFeatureNoiseSigma(FeatureNoiseSigma value)
This is similar to [noise_sigma][google.cloud.aiplatform.v1.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.v1.SmoothGradConfig.noise_sigma] will be used for all features.
.google.cloud.aiplatform.v1.FeatureNoiseSigma feature_noise_sigma = 2;
-
setFeatureNoiseSigma
public SmoothGradConfig.Builder setFeatureNoiseSigma(FeatureNoiseSigma.Builder builderForValue)
This is similar to [noise_sigma][google.cloud.aiplatform.v1.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.v1.SmoothGradConfig.noise_sigma] will be used for all features.
.google.cloud.aiplatform.v1.FeatureNoiseSigma feature_noise_sigma = 2;
-
mergeFeatureNoiseSigma
public SmoothGradConfig.Builder mergeFeatureNoiseSigma(FeatureNoiseSigma value)
This is similar to [noise_sigma][google.cloud.aiplatform.v1.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.v1.SmoothGradConfig.noise_sigma] will be used for all features.
.google.cloud.aiplatform.v1.FeatureNoiseSigma feature_noise_sigma = 2;
-
clearFeatureNoiseSigma
public SmoothGradConfig.Builder clearFeatureNoiseSigma()
This is similar to [noise_sigma][google.cloud.aiplatform.v1.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.v1.SmoothGradConfig.noise_sigma] will be used for all features.
.google.cloud.aiplatform.v1.FeatureNoiseSigma feature_noise_sigma = 2;
-
getFeatureNoiseSigmaBuilder
public FeatureNoiseSigma.Builder getFeatureNoiseSigmaBuilder()
This is similar to [noise_sigma][google.cloud.aiplatform.v1.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.v1.SmoothGradConfig.noise_sigma] will be used for all features.
.google.cloud.aiplatform.v1.FeatureNoiseSigma feature_noise_sigma = 2;
-
getFeatureNoiseSigmaOrBuilder
public FeatureNoiseSigmaOrBuilder getFeatureNoiseSigmaOrBuilder()
This is similar to [noise_sigma][google.cloud.aiplatform.v1.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.v1.SmoothGradConfig.noise_sigma] will be used for all features.
.google.cloud.aiplatform.v1.FeatureNoiseSigma feature_noise_sigma = 2;- Specified by:
getFeatureNoiseSigmaOrBuilderin interfaceSmoothGradConfigOrBuilder
-
getNoisySampleCount
public int getNoisySampleCount()
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;- Specified by:
getNoisySampleCountin interfaceSmoothGradConfigOrBuilder- Returns:
- The noisySampleCount.
-
setNoisySampleCount
public SmoothGradConfig.Builder setNoisySampleCount(int value)
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;- Parameters:
value- The noisySampleCount to set.- Returns:
- This builder for chaining.
-
clearNoisySampleCount
public SmoothGradConfig.Builder clearNoisySampleCount()
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:
- This builder for chaining.
-
setUnknownFields
public final SmoothGradConfig.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
mergeUnknownFields
public final SmoothGradConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
-