Package org.tensorflow.framework
Class AttrValue.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<AttrValue.Builder>
org.tensorflow.framework.AttrValue.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,java.lang.Cloneable,AttrValueOrBuilder
- Enclosing class:
- AttrValue
public static final class AttrValue.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<AttrValue.Builder> implements AttrValueOrBuilder
Protocol buffer representing the value for an attr used to configure an Op. Comment indicates the corresponding attr type. Only the field matching the attr type may be filled.Protobuf type
tensorflow.AttrValue-
Method Summary
Modifier and Type Method Description AttrValue.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)AttrValuebuild()AttrValuebuildPartial()AttrValue.Builderclear()AttrValue.BuilderclearB()"bool"AttrValue.BuilderclearF()"float"AttrValue.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)AttrValue.BuilderclearFunc()"func" represents a function.AttrValue.BuilderclearI()"int"AttrValue.BuilderclearList()any "list(...)"AttrValue.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)AttrValue.BuilderclearPlaceholder()This is a placeholder only used in nodes defined inside a function.AttrValue.BuilderclearS()"string"AttrValue.BuilderclearShape()"shape"AttrValue.BuilderclearTensor()"tensor"AttrValue.BuilderclearType()"type"AttrValue.BuilderclearValue()AttrValue.Builderclone()booleangetB()"bool"AttrValuegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()floatgetF()"float"NameAttrListgetFunc()"func" represents a function.NameAttrList.BuildergetFuncBuilder()"func" represents a function.NameAttrListOrBuildergetFuncOrBuilder()"func" represents a function.longgetI()"int"AttrValue.ListValuegetList()any "list(...)"AttrValue.ListValue.BuildergetListBuilder()any "list(...)"AttrValue.ListValueOrBuildergetListOrBuilder()any "list(...)"java.lang.StringgetPlaceholder()This is a placeholder only used in nodes defined inside a function.com.google.protobuf.ByteStringgetPlaceholderBytes()This is a placeholder only used in nodes defined inside a function.com.google.protobuf.ByteStringgetS()"string"TensorShapeProtogetShape()"shape"TensorShapeProto.BuildergetShapeBuilder()"shape"TensorShapeProtoOrBuildergetShapeOrBuilder()"shape"TensorProtogetTensor()"tensor"TensorProto.BuildergetTensorBuilder()"tensor"TensorProtoOrBuildergetTensorOrBuilder()"tensor"DataTypegetType()"type"intgetTypeValue()"type"AttrValue.ValueCasegetValueCase()booleanhasFunc()"func" represents a function.booleanhasList()any "list(...)"booleanhasShape()"shape"booleanhasTensor()"tensor"protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()AttrValue.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)AttrValue.BuildermergeFrom(com.google.protobuf.Message other)AttrValue.BuildermergeFrom(AttrValue other)AttrValue.BuildermergeFunc(NameAttrList value)"func" represents a function.AttrValue.BuildermergeList(AttrValue.ListValue value)any "list(...)"AttrValue.BuildermergeShape(TensorShapeProto value)"shape"AttrValue.BuildermergeTensor(TensorProto value)"tensor"AttrValue.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)AttrValue.BuildersetB(boolean value)"bool"AttrValue.BuildersetF(float value)"float"AttrValue.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)AttrValue.BuildersetFunc(NameAttrList value)"func" represents a function.AttrValue.BuildersetFunc(NameAttrList.Builder builderForValue)"func" represents a function.AttrValue.BuildersetI(long value)"int"AttrValue.BuildersetList(AttrValue.ListValue value)any "list(...)"AttrValue.BuildersetList(AttrValue.ListValue.Builder builderForValue)any "list(...)"AttrValue.BuildersetPlaceholder(java.lang.String value)This is a placeholder only used in nodes defined inside a function.AttrValue.BuildersetPlaceholderBytes(com.google.protobuf.ByteString value)This is a placeholder only used in nodes defined inside a function.AttrValue.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)AttrValue.BuildersetS(com.google.protobuf.ByteString value)"string"AttrValue.BuildersetShape(TensorShapeProto value)"shape"AttrValue.BuildersetShape(TensorShapeProto.Builder builderForValue)"shape"AttrValue.BuildersetTensor(TensorProto value)"tensor"AttrValue.BuildersetTensor(TensorProto.Builder builderForValue)"tensor"AttrValue.BuildersetType(DataType value)"type"AttrValue.BuildersetTypeValue(int value)"type"AttrValue.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeFrom, newUninitializedMessageException
-
Method Details
-
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<AttrValue.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<AttrValue.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<AttrValue.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.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<AttrValue.Builder>
-
setField
public AttrValue.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AttrValue.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AttrValue.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<AttrValue.Builder>
-
setRepeatedField
public AttrValue.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AttrValue.Builder>
-
addRepeatedField
public AttrValue.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AttrValue.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AttrValue.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<AttrValue.Builder>
-
mergeFrom
public AttrValue.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AttrValue.Builder>- Throws:
java.io.IOException
-
getValueCase
- Specified by:
getValueCasein interfaceAttrValueOrBuilder
-
clearValue
-
getS
public com.google.protobuf.ByteString getS()"string"
bytes s = 2;- Specified by:
getSin interfaceAttrValueOrBuilder- Returns:
- The s.
-
setS
"string"
bytes s = 2;- Parameters:
value- The s to set.- Returns:
- This builder for chaining.
-
clearS
"string"
bytes s = 2;- Returns:
- This builder for chaining.
-
getI
public long getI()"int"
int64 i = 3;- Specified by:
getIin interfaceAttrValueOrBuilder- Returns:
- The i.
-
setI
"int"
int64 i = 3;- Parameters:
value- The i to set.- Returns:
- This builder for chaining.
-
clearI
"int"
int64 i = 3;- Returns:
- This builder for chaining.
-
getF
public float getF()"float"
float f = 4;- Specified by:
getFin interfaceAttrValueOrBuilder- Returns:
- The f.
-
setF
"float"
float f = 4;- Parameters:
value- The f to set.- Returns:
- This builder for chaining.
-
clearF
"float"
float f = 4;- Returns:
- This builder for chaining.
-
getB
public boolean getB()"bool"
bool b = 5;- Specified by:
getBin interfaceAttrValueOrBuilder- Returns:
- The b.
-
setB
"bool"
bool b = 5;- Parameters:
value- The b to set.- Returns:
- This builder for chaining.
-
clearB
"bool"
bool b = 5;- Returns:
- This builder for chaining.
-
getTypeValue
public int getTypeValue()"type"
.tensorflow.DataType type = 6;- Specified by:
getTypeValuein interfaceAttrValueOrBuilder- Returns:
- The enum numeric value on the wire for type.
-
setTypeValue
"type"
.tensorflow.DataType type = 6;- Parameters:
value- The enum numeric value on the wire for type to set.- Returns:
- This builder for chaining.
-
getType
"type"
.tensorflow.DataType type = 6;- Specified by:
getTypein interfaceAttrValueOrBuilder- Returns:
- The type.
-
setType
"type"
.tensorflow.DataType type = 6;- Parameters:
value- The type to set.- Returns:
- This builder for chaining.
-
clearType
"type"
.tensorflow.DataType type = 6;- Returns:
- This builder for chaining.
-
hasShape
public boolean hasShape()"shape"
.tensorflow.TensorShapeProto shape = 7;- Specified by:
hasShapein interfaceAttrValueOrBuilder- Returns:
- Whether the shape field is set.
-
getShape
"shape"
.tensorflow.TensorShapeProto shape = 7;- Specified by:
getShapein interfaceAttrValueOrBuilder- Returns:
- The shape.
-
setShape
"shape"
.tensorflow.TensorShapeProto shape = 7; -
setShape
"shape"
.tensorflow.TensorShapeProto shape = 7; -
mergeShape
"shape"
.tensorflow.TensorShapeProto shape = 7; -
clearShape
"shape"
.tensorflow.TensorShapeProto shape = 7; -
getShapeBuilder
"shape"
.tensorflow.TensorShapeProto shape = 7; -
getShapeOrBuilder
"shape"
.tensorflow.TensorShapeProto shape = 7;- Specified by:
getShapeOrBuilderin interfaceAttrValueOrBuilder
-
hasTensor
public boolean hasTensor()"tensor"
.tensorflow.TensorProto tensor = 8;- Specified by:
hasTensorin interfaceAttrValueOrBuilder- Returns:
- Whether the tensor field is set.
-
getTensor
"tensor"
.tensorflow.TensorProto tensor = 8;- Specified by:
getTensorin interfaceAttrValueOrBuilder- Returns:
- The tensor.
-
setTensor
"tensor"
.tensorflow.TensorProto tensor = 8; -
setTensor
"tensor"
.tensorflow.TensorProto tensor = 8; -
mergeTensor
"tensor"
.tensorflow.TensorProto tensor = 8; -
clearTensor
"tensor"
.tensorflow.TensorProto tensor = 8; -
getTensorBuilder
"tensor"
.tensorflow.TensorProto tensor = 8; -
getTensorOrBuilder
"tensor"
.tensorflow.TensorProto tensor = 8;- Specified by:
getTensorOrBuilderin interfaceAttrValueOrBuilder
-
hasList
public boolean hasList()any "list(...)"
.tensorflow.AttrValue.ListValue list = 1;- Specified by:
hasListin interfaceAttrValueOrBuilder- Returns:
- Whether the list field is set.
-
getList
any "list(...)"
.tensorflow.AttrValue.ListValue list = 1;- Specified by:
getListin interfaceAttrValueOrBuilder- Returns:
- The list.
-
setList
any "list(...)"
.tensorflow.AttrValue.ListValue list = 1; -
setList
any "list(...)"
.tensorflow.AttrValue.ListValue list = 1; -
mergeList
any "list(...)"
.tensorflow.AttrValue.ListValue list = 1; -
clearList
any "list(...)"
.tensorflow.AttrValue.ListValue list = 1; -
getListBuilder
any "list(...)"
.tensorflow.AttrValue.ListValue list = 1; -
getListOrBuilder
any "list(...)"
.tensorflow.AttrValue.ListValue list = 1;- Specified by:
getListOrBuilderin interfaceAttrValueOrBuilder
-
hasFunc
public boolean hasFunc()"func" represents a function. func.name is a function's name or a primitive op's name. func.attr.first is the name of an attr defined for that function. func.attr.second is the value for that attr in the instantiation.
.tensorflow.NameAttrList func = 10;- Specified by:
hasFuncin interfaceAttrValueOrBuilder- Returns:
- Whether the func field is set.
-
getFunc
"func" represents a function. func.name is a function's name or a primitive op's name. func.attr.first is the name of an attr defined for that function. func.attr.second is the value for that attr in the instantiation.
.tensorflow.NameAttrList func = 10;- Specified by:
getFuncin interfaceAttrValueOrBuilder- Returns:
- The func.
-
setFunc
"func" represents a function. func.name is a function's name or a primitive op's name. func.attr.first is the name of an attr defined for that function. func.attr.second is the value for that attr in the instantiation.
.tensorflow.NameAttrList func = 10; -
setFunc
"func" represents a function. func.name is a function's name or a primitive op's name. func.attr.first is the name of an attr defined for that function. func.attr.second is the value for that attr in the instantiation.
.tensorflow.NameAttrList func = 10; -
mergeFunc
"func" represents a function. func.name is a function's name or a primitive op's name. func.attr.first is the name of an attr defined for that function. func.attr.second is the value for that attr in the instantiation.
.tensorflow.NameAttrList func = 10; -
clearFunc
"func" represents a function. func.name is a function's name or a primitive op's name. func.attr.first is the name of an attr defined for that function. func.attr.second is the value for that attr in the instantiation.
.tensorflow.NameAttrList func = 10; -
getFuncBuilder
"func" represents a function. func.name is a function's name or a primitive op's name. func.attr.first is the name of an attr defined for that function. func.attr.second is the value for that attr in the instantiation.
.tensorflow.NameAttrList func = 10; -
getFuncOrBuilder
"func" represents a function. func.name is a function's name or a primitive op's name. func.attr.first is the name of an attr defined for that function. func.attr.second is the value for that attr in the instantiation.
.tensorflow.NameAttrList func = 10;- Specified by:
getFuncOrBuilderin interfaceAttrValueOrBuilder
-
getPlaceholder
public java.lang.String getPlaceholder()This is a placeholder only used in nodes defined inside a function. It indicates the attr value will be supplied when the function is instantiated. For example, let us suppose a node "N" in function "FN". "N" has an attr "A" with value placeholder = "foo". When FN is instantiated with attr "foo" set to "bar", the instantiated node N's attr A will have been given the value "bar".
string placeholder = 9;- Specified by:
getPlaceholderin interfaceAttrValueOrBuilder- Returns:
- The placeholder.
-
getPlaceholderBytes
public com.google.protobuf.ByteString getPlaceholderBytes()This is a placeholder only used in nodes defined inside a function. It indicates the attr value will be supplied when the function is instantiated. For example, let us suppose a node "N" in function "FN". "N" has an attr "A" with value placeholder = "foo". When FN is instantiated with attr "foo" set to "bar", the instantiated node N's attr A will have been given the value "bar".
string placeholder = 9;- Specified by:
getPlaceholderBytesin interfaceAttrValueOrBuilder- Returns:
- The bytes for placeholder.
-
setPlaceholder
This is a placeholder only used in nodes defined inside a function. It indicates the attr value will be supplied when the function is instantiated. For example, let us suppose a node "N" in function "FN". "N" has an attr "A" with value placeholder = "foo". When FN is instantiated with attr "foo" set to "bar", the instantiated node N's attr A will have been given the value "bar".
string placeholder = 9;- Parameters:
value- The placeholder to set.- Returns:
- This builder for chaining.
-
clearPlaceholder
This is a placeholder only used in nodes defined inside a function. It indicates the attr value will be supplied when the function is instantiated. For example, let us suppose a node "N" in function "FN". "N" has an attr "A" with value placeholder = "foo". When FN is instantiated with attr "foo" set to "bar", the instantiated node N's attr A will have been given the value "bar".
string placeholder = 9;- Returns:
- This builder for chaining.
-
setPlaceholderBytes
This is a placeholder only used in nodes defined inside a function. It indicates the attr value will be supplied when the function is instantiated. For example, let us suppose a node "N" in function "FN". "N" has an attr "A" with value placeholder = "foo". When FN is instantiated with attr "foo" set to "bar", the instantiated node N's attr A will have been given the value "bar".
string placeholder = 9;- Parameters:
value- The bytes for placeholder to set.- Returns:
- This builder for chaining.
-
setUnknownFields
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<AttrValue.Builder>
-
mergeUnknownFields
public final AttrValue.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<AttrValue.Builder>
-