Class AttrValue.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<AttrValue.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<AttrValue.Builder>
org.tensorflow.proto.AttrValue.Builder
- All Implemented Interfaces:
Message.Builder, MessageLite.Builder, MessageLiteOrBuilder, MessageOrBuilder, Cloneable, AttrValueOrBuilder
- Enclosing class:
AttrValue
public static final class AttrValue.Builder
extends 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 TypeMethodDescriptionaddRepeatedField(Descriptors.FieldDescriptor field, Object value) build()clear()clearB()"bool"clearF()"float""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.clearI()"int"any "list(...)"This is a placeholder only used in nodes defined inside a function.clearS()"string""shape""tensor""type"clone()booleangetB()"bool"static final Descriptors.DescriptorfloatgetF()"float"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."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."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.longgetI()"int"getList()any "list(...)"any "list(...)"any "list(...)"This is a placeholder only used in nodes defined inside a function.This is a placeholder only used in nodes defined inside a function.getS()"string"getShape()"shape""shape""shape""tensor""tensor""tensor"getType()"type"int"type"booleanhasB()"bool"booleanhasF()"float"booleanhasFunc()"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.booleanhasI()"int"booleanhasList()any "list(...)"booleanThis is a placeholder only used in nodes defined inside a function.booleanhasS()"string"booleanhasShape()"shape"boolean"tensor"booleanhasType()"type"protected GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) mergeFunc(NameAttrList value) "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.mergeList(AttrValue.ListValue value) any "list(...)"mergeShape(TensorShapeProto value) "shape"mergeTensor(TensorProto value) "tensor"final AttrValue.BuildermergeUnknownFields(UnknownFieldSet unknownFields) setB(boolean value) "bool"setF(float value) "float"setField(Descriptors.FieldDescriptor field, Object value) setFunc(NameAttrList value) "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.setFunc(NameAttrList.Builder builderForValue) "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.setI(long value) "int"setList(AttrValue.ListValue value) any "list(...)"setList(AttrValue.ListValue.Builder builderForValue) any "list(...)"setPlaceholder(String value) This is a placeholder only used in nodes defined inside a function.setPlaceholderBytes(ByteString value) This is a placeholder only used in nodes defined inside a function.setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value) setS(ByteString value) "string"setShape(TensorShapeProto value) "shape"setShape(TensorShapeProto.Builder builderForValue) "shape"setTensor(TensorProto value) "tensor"setTensor(TensorProto.Builder builderForValue) "tensor""type"setTypeValue(int value) "type"final AttrValue.BuildersetUnknownFields(UnknownFieldSet unknownFields) Methods inherited from class 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, setUnknownFieldsProto3Methods inherited from class AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface MessageLite.Builder
mergeFromMethods inherited from interface MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
-
internalGetFieldAccessorTable
- Specified by:
internalGetFieldAccessorTablein classGeneratedMessageV3.Builder<AttrValue.Builder>
-
clear
- Specified by:
clearin interfaceMessage.Builder- Specified by:
clearin interfaceMessageLite.Builder- Overrides:
clearin classGeneratedMessageV3.Builder<AttrValue.Builder>
-
getDescriptorForType
- Specified by:
getDescriptorForTypein interfaceMessage.Builder- Specified by:
getDescriptorForTypein interfaceMessageOrBuilder- Overrides:
getDescriptorForTypein classGeneratedMessageV3.Builder<AttrValue.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfaceMessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfaceMessageOrBuilder
-
build
- Specified by:
buildin interfaceMessage.Builder- Specified by:
buildin interfaceMessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfaceMessage.Builder- Specified by:
buildPartialin interfaceMessageLite.Builder
-
clone
- Specified by:
clonein interfaceMessage.Builder- Specified by:
clonein interfaceMessageLite.Builder- Overrides:
clonein classGeneratedMessageV3.Builder<AttrValue.Builder>
-
setField
- Specified by:
setFieldin interfaceMessage.Builder- Overrides:
setFieldin classGeneratedMessageV3.Builder<AttrValue.Builder>
-
clearField
- Specified by:
clearFieldin interfaceMessage.Builder- Overrides:
clearFieldin classGeneratedMessageV3.Builder<AttrValue.Builder>
-
clearOneof
- Specified by:
clearOneofin interfaceMessage.Builder- Overrides:
clearOneofin classGeneratedMessageV3.Builder<AttrValue.Builder>
-
setRepeatedField
public AttrValue.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfaceMessage.Builder- Overrides:
setRepeatedFieldin classGeneratedMessageV3.Builder<AttrValue.Builder>
-
addRepeatedField
- Specified by:
addRepeatedFieldin interfaceMessage.Builder- Overrides:
addRepeatedFieldin classGeneratedMessageV3.Builder<AttrValue.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfaceMessage.Builder- Overrides:
mergeFromin classAbstractMessage.Builder<AttrValue.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfaceMessageLiteOrBuilder- Overrides:
isInitializedin classGeneratedMessageV3.Builder<AttrValue.Builder>
-
mergeFrom
public AttrValue.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfaceMessage.Builder- Specified by:
mergeFromin interfaceMessageLite.Builder- Overrides:
mergeFromin classAbstractMessage.Builder<AttrValue.Builder>- Throws:
IOException
-
getValueCase
- Specified by:
getValueCasein interfaceAttrValueOrBuilder
-
clearValue
-
hasS
public boolean hasS()"string"
bytes s = 2;- Specified by:
hasSin interfaceAttrValueOrBuilder- Returns:
- Whether the s field is set.
-
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
-
hasI
public boolean hasI()"int"
int64 i = 3;- Specified by:
hasIin interfaceAttrValueOrBuilder- Returns:
- Whether the i field is set.
-
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
-
hasF
public boolean hasF()"float"
float f = 4;- Specified by:
hasFin interfaceAttrValueOrBuilder- Returns:
- Whether the f field is set.
-
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
-
hasB
public boolean hasB()"bool"
bool b = 5;- Specified by:
hasBin interfaceAttrValueOrBuilder- Returns:
- Whether the b field is set.
-
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
-
hasType
public boolean hasType()"type"
.tensorflow.DataType type = 6;- Specified by:
hasTypein interfaceAttrValueOrBuilder- Returns:
- Whether the type field is set.
-
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
-
hasPlaceholder
public boolean hasPlaceholder()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:
hasPlaceholderin interfaceAttrValueOrBuilder- Returns:
- Whether the placeholder field is set.
-
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
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 interfaceMessage.Builder- Overrides:
setUnknownFieldsin classGeneratedMessageV3.Builder<AttrValue.Builder>
-
mergeUnknownFields
- Specified by:
mergeUnknownFieldsin interfaceMessage.Builder- Overrides:
mergeUnknownFieldsin classGeneratedMessageV3.Builder<AttrValue.Builder>
-