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.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
SmoothGradConfig
build()
SmoothGradConfig
buildPartial()
SmoothGradConfig.Builder
clear()
SmoothGradConfig.Builder
clearFeatureNoiseSigma()
This is similar to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], but provides additional flexibility.SmoothGradConfig.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
SmoothGradConfig.Builder
clearGradientNoiseSigma()
SmoothGradConfig.Builder
clearNoiseSigma()
This is a single float value and will be used to add noise to all the features.SmoothGradConfig.Builder
clearNoisySampleCount()
The number of gradient samples to use for approximation.SmoothGradConfig.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
SmoothGradConfig.Builder
clone()
SmoothGradConfig
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
FeatureNoiseSigma
getFeatureNoiseSigma()
This is similar to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], but provides additional flexibility.FeatureNoiseSigma.Builder
getFeatureNoiseSigmaBuilder()
This is similar to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], but provides additional flexibility.FeatureNoiseSigmaOrBuilder
getFeatureNoiseSigmaOrBuilder()
This is similar to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], but provides additional flexibility.SmoothGradConfig.GradientNoiseSigmaCase
getGradientNoiseSigmaCase()
float
getNoiseSigma()
This is a single float value and will be used to add noise to all the features.int
getNoisySampleCount()
The number of gradient samples to use for approximation.boolean
hasFeatureNoiseSigma()
This is similar to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], but provides additional flexibility.boolean
hasNoiseSigma()
This is a single float value and will be used to add noise to all the features.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
SmoothGradConfig.Builder
mergeFeatureNoiseSigma(FeatureNoiseSigma value)
This is similar to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], but provides additional flexibility.SmoothGradConfig.Builder
mergeFrom(SmoothGradConfig other)
SmoothGradConfig.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
SmoothGradConfig.Builder
mergeFrom(com.google.protobuf.Message other)
SmoothGradConfig.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
SmoothGradConfig.Builder
setFeatureNoiseSigma(FeatureNoiseSigma value)
This is similar to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], but provides additional flexibility.SmoothGradConfig.Builder
setFeatureNoiseSigma(FeatureNoiseSigma.Builder builderForValue)
This is similar to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], but provides additional flexibility.SmoothGradConfig.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
SmoothGradConfig.Builder
setNoiseSigma(float value)
This is a single float value and will be used to add noise to all the features.SmoothGradConfig.Builder
setNoisySampleCount(int value)
The number of gradient samples to use for approximation.SmoothGradConfig.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
SmoothGradConfig.Builder
setUnknownFields(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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
clear
public SmoothGradConfig.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
getDefaultInstanceForType
public SmoothGradConfig getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public SmoothGradConfig build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public SmoothGradConfig buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public SmoothGradConfig.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
setField
public SmoothGradConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
clearField
public SmoothGradConfig.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
clearOneof
public SmoothGradConfig.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
setRepeatedField
public SmoothGradConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
addRepeatedField
public SmoothGradConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
mergeFrom
public SmoothGradConfig.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<SmoothGradConfig.Builder>
-
mergeFrom
public SmoothGradConfig.Builder mergeFrom(SmoothGradConfig other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<SmoothGradConfig.Builder>
- Throws:
IOException
-
getGradientNoiseSigmaCase
public SmoothGradConfig.GradientNoiseSigmaCase getGradientNoiseSigmaCase()
- Specified by:
getGradientNoiseSigmaCase
in 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:
hasNoiseSigma
in 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:
getNoiseSigma
in 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:
hasFeatureNoiseSigma
in 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:
getFeatureNoiseSigma
in 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:
getFeatureNoiseSigmaOrBuilder
in 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:
getNoisySampleCount
in 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:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
mergeUnknownFields
public final SmoothGradConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<SmoothGradConfig.Builder>
-
-