Package org.tensorflow.framework
Class GraphDef.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<GraphDef.Builder>
org.tensorflow.framework.GraphDef.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,GraphDefOrBuilder
- Enclosing class:
- GraphDef
public static final class GraphDef.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<GraphDef.Builder> implements GraphDefOrBuilder
Represents the graph of operationsProtobuf type
tensorflow.GraphDef-
Method Summary
Modifier and Type Method Description GraphDef.BuilderaddAllNode(java.lang.Iterable<? extends NodeDef> values)repeated .tensorflow.NodeDef node = 1;GraphDef.BuilderaddNode(int index, NodeDef value)repeated .tensorflow.NodeDef node = 1;GraphDef.BuilderaddNode(int index, NodeDef.Builder builderForValue)repeated .tensorflow.NodeDef node = 1;GraphDef.BuilderaddNode(NodeDef value)repeated .tensorflow.NodeDef node = 1;GraphDef.BuilderaddNode(NodeDef.Builder builderForValue)repeated .tensorflow.NodeDef node = 1;NodeDef.BuilderaddNodeBuilder()repeated .tensorflow.NodeDef node = 1;NodeDef.BuilderaddNodeBuilder(int index)repeated .tensorflow.NodeDef node = 1;GraphDef.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)GraphDefbuild()GraphDefbuildPartial()GraphDef.Builderclear()GraphDef.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)GraphDef.BuilderclearLibrary()EXPERIMENTAL.GraphDef.BuilderclearNode()repeated .tensorflow.NodeDef node = 1;GraphDef.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)GraphDef.BuilderclearVersion()Deprecated.GraphDef.BuilderclearVersions()Compatibility versions of the graph.GraphDef.Builderclone()GraphDefgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()FunctionDefLibrarygetLibrary()EXPERIMENTAL.FunctionDefLibrary.BuildergetLibraryBuilder()EXPERIMENTAL.FunctionDefLibraryOrBuildergetLibraryOrBuilder()EXPERIMENTAL.NodeDefgetNode(int index)repeated .tensorflow.NodeDef node = 1;NodeDef.BuildergetNodeBuilder(int index)repeated .tensorflow.NodeDef node = 1;java.util.List<NodeDef.Builder>getNodeBuilderList()repeated .tensorflow.NodeDef node = 1;intgetNodeCount()repeated .tensorflow.NodeDef node = 1;java.util.List<NodeDef>getNodeList()repeated .tensorflow.NodeDef node = 1;NodeDefOrBuildergetNodeOrBuilder(int index)repeated .tensorflow.NodeDef node = 1;java.util.List<? extends NodeDefOrBuilder>getNodeOrBuilderList()repeated .tensorflow.NodeDef node = 1;intgetVersion()Deprecated.VersionDefgetVersions()Compatibility versions of the graph.VersionDef.BuildergetVersionsBuilder()Compatibility versions of the graph.VersionDefOrBuildergetVersionsOrBuilder()Compatibility versions of the graph.booleanhasLibrary()EXPERIMENTAL.booleanhasVersions()Compatibility versions of the graph.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()GraphDef.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)GraphDef.BuildermergeFrom(com.google.protobuf.Message other)GraphDef.BuildermergeFrom(GraphDef other)GraphDef.BuildermergeLibrary(FunctionDefLibrary value)EXPERIMENTAL.GraphDef.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)GraphDef.BuildermergeVersions(VersionDef value)Compatibility versions of the graph.GraphDef.BuilderremoveNode(int index)repeated .tensorflow.NodeDef node = 1;GraphDef.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)GraphDef.BuildersetLibrary(FunctionDefLibrary value)EXPERIMENTAL.GraphDef.BuildersetLibrary(FunctionDefLibrary.Builder builderForValue)EXPERIMENTAL.GraphDef.BuildersetNode(int index, NodeDef value)repeated .tensorflow.NodeDef node = 1;GraphDef.BuildersetNode(int index, NodeDef.Builder builderForValue)repeated .tensorflow.NodeDef node = 1;GraphDef.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)GraphDef.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)GraphDef.BuildersetVersion(int value)Deprecated.GraphDef.BuildersetVersions(VersionDef value)Compatibility versions of the graph.GraphDef.BuildersetVersions(VersionDef.Builder builderForValue)Compatibility versions of the graph.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<GraphDef.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<GraphDef.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<GraphDef.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<GraphDef.Builder>
-
setField
public GraphDef.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<GraphDef.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<GraphDef.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<GraphDef.Builder>
-
setRepeatedField
public GraphDef.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<GraphDef.Builder>
-
addRepeatedField
public GraphDef.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<GraphDef.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<GraphDef.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<GraphDef.Builder>
-
mergeFrom
public GraphDef.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<GraphDef.Builder>- Throws:
java.io.IOException
-
getNodeList
repeated .tensorflow.NodeDef node = 1;- Specified by:
getNodeListin interfaceGraphDefOrBuilder
-
getNodeCount
public int getNodeCount()repeated .tensorflow.NodeDef node = 1;- Specified by:
getNodeCountin interfaceGraphDefOrBuilder
-
getNode
repeated .tensorflow.NodeDef node = 1;- Specified by:
getNodein interfaceGraphDefOrBuilder
-
setNode
repeated .tensorflow.NodeDef node = 1; -
setNode
repeated .tensorflow.NodeDef node = 1; -
addNode
repeated .tensorflow.NodeDef node = 1; -
addNode
repeated .tensorflow.NodeDef node = 1; -
addNode
repeated .tensorflow.NodeDef node = 1; -
addNode
repeated .tensorflow.NodeDef node = 1; -
addAllNode
repeated .tensorflow.NodeDef node = 1; -
clearNode
repeated .tensorflow.NodeDef node = 1; -
removeNode
repeated .tensorflow.NodeDef node = 1; -
getNodeBuilder
repeated .tensorflow.NodeDef node = 1; -
getNodeOrBuilder
repeated .tensorflow.NodeDef node = 1;- Specified by:
getNodeOrBuilderin interfaceGraphDefOrBuilder
-
getNodeOrBuilderList
repeated .tensorflow.NodeDef node = 1;- Specified by:
getNodeOrBuilderListin interfaceGraphDefOrBuilder
-
addNodeBuilder
repeated .tensorflow.NodeDef node = 1; -
addNodeBuilder
repeated .tensorflow.NodeDef node = 1; -
getNodeBuilderList
repeated .tensorflow.NodeDef node = 1; -
hasVersions
public boolean hasVersions()Compatibility versions of the graph. See core/public/version.h for version history. The GraphDef version is distinct from the TensorFlow version, and each release of TensorFlow will support a range of GraphDef versions.
.tensorflow.VersionDef versions = 4;- Specified by:
hasVersionsin interfaceGraphDefOrBuilder- Returns:
- Whether the versions field is set.
-
getVersions
Compatibility versions of the graph. See core/public/version.h for version history. The GraphDef version is distinct from the TensorFlow version, and each release of TensorFlow will support a range of GraphDef versions.
.tensorflow.VersionDef versions = 4;- Specified by:
getVersionsin interfaceGraphDefOrBuilder- Returns:
- The versions.
-
setVersions
Compatibility versions of the graph. See core/public/version.h for version history. The GraphDef version is distinct from the TensorFlow version, and each release of TensorFlow will support a range of GraphDef versions.
.tensorflow.VersionDef versions = 4; -
setVersions
Compatibility versions of the graph. See core/public/version.h for version history. The GraphDef version is distinct from the TensorFlow version, and each release of TensorFlow will support a range of GraphDef versions.
.tensorflow.VersionDef versions = 4; -
mergeVersions
Compatibility versions of the graph. See core/public/version.h for version history. The GraphDef version is distinct from the TensorFlow version, and each release of TensorFlow will support a range of GraphDef versions.
.tensorflow.VersionDef versions = 4; -
clearVersions
Compatibility versions of the graph. See core/public/version.h for version history. The GraphDef version is distinct from the TensorFlow version, and each release of TensorFlow will support a range of GraphDef versions.
.tensorflow.VersionDef versions = 4; -
getVersionsBuilder
Compatibility versions of the graph. See core/public/version.h for version history. The GraphDef version is distinct from the TensorFlow version, and each release of TensorFlow will support a range of GraphDef versions.
.tensorflow.VersionDef versions = 4; -
getVersionsOrBuilder
Compatibility versions of the graph. See core/public/version.h for version history. The GraphDef version is distinct from the TensorFlow version, and each release of TensorFlow will support a range of GraphDef versions.
.tensorflow.VersionDef versions = 4;- Specified by:
getVersionsOrBuilderin interfaceGraphDefOrBuilder
-
getVersion
@Deprecated public int getVersion()Deprecated.Deprecated single version field; use versions above instead. Since all GraphDef changes before "versions" was introduced were forward compatible, this field is entirely ignored.
int32 version = 3 [deprecated = true];- Specified by:
getVersionin interfaceGraphDefOrBuilder- Returns:
- The version.
-
setVersion
Deprecated.Deprecated single version field; use versions above instead. Since all GraphDef changes before "versions" was introduced were forward compatible, this field is entirely ignored.
int32 version = 3 [deprecated = true];- Parameters:
value- The version to set.- Returns:
- This builder for chaining.
-
clearVersion
Deprecated.Deprecated single version field; use versions above instead. Since all GraphDef changes before "versions" was introduced were forward compatible, this field is entirely ignored.
int32 version = 3 [deprecated = true];- Returns:
- This builder for chaining.
-
hasLibrary
public boolean hasLibrary()EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET. "library" provides user-defined functions. Naming: * library.function.name are in a flat namespace. NOTE: We may need to change it to be hierarchical to support different orgs. E.g., { "/google/nn", { ... }}, { "/google/vision", { ... }} { "/org_foo/module_bar", { ... }} map<string, FunctionDefLib> named_lib; * If node[i].op is the name of one function in "library", node[i] is deemed as a function call. Otherwise, node[i].op must be a primitive operation supported by the runtime. Function call semantics: * The callee may start execution as soon as some of its inputs are ready. The caller may want to use Tuple() mechanism to ensure all inputs are ready in the same time. * The consumer of return values may start executing as soon as the return values the consumer depends on are ready. The consumer may want to use Tuple() mechanism to ensure the consumer does not start until all return values of the callee function are ready..tensorflow.FunctionDefLibrary library = 2;- Specified by:
hasLibraryin interfaceGraphDefOrBuilder- Returns:
- Whether the library field is set.
-
getLibrary
EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET. "library" provides user-defined functions. Naming: * library.function.name are in a flat namespace. NOTE: We may need to change it to be hierarchical to support different orgs. E.g., { "/google/nn", { ... }}, { "/google/vision", { ... }} { "/org_foo/module_bar", { ... }} map<string, FunctionDefLib> named_lib; * If node[i].op is the name of one function in "library", node[i] is deemed as a function call. Otherwise, node[i].op must be a primitive operation supported by the runtime. Function call semantics: * The callee may start execution as soon as some of its inputs are ready. The caller may want to use Tuple() mechanism to ensure all inputs are ready in the same time. * The consumer of return values may start executing as soon as the return values the consumer depends on are ready. The consumer may want to use Tuple() mechanism to ensure the consumer does not start until all return values of the callee function are ready..tensorflow.FunctionDefLibrary library = 2;- Specified by:
getLibraryin interfaceGraphDefOrBuilder- Returns:
- The library.
-
setLibrary
EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET. "library" provides user-defined functions. Naming: * library.function.name are in a flat namespace. NOTE: We may need to change it to be hierarchical to support different orgs. E.g., { "/google/nn", { ... }}, { "/google/vision", { ... }} { "/org_foo/module_bar", { ... }} map<string, FunctionDefLib> named_lib; * If node[i].op is the name of one function in "library", node[i] is deemed as a function call. Otherwise, node[i].op must be a primitive operation supported by the runtime. Function call semantics: * The callee may start execution as soon as some of its inputs are ready. The caller may want to use Tuple() mechanism to ensure all inputs are ready in the same time. * The consumer of return values may start executing as soon as the return values the consumer depends on are ready. The consumer may want to use Tuple() mechanism to ensure the consumer does not start until all return values of the callee function are ready..tensorflow.FunctionDefLibrary library = 2; -
setLibrary
EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET. "library" provides user-defined functions. Naming: * library.function.name are in a flat namespace. NOTE: We may need to change it to be hierarchical to support different orgs. E.g., { "/google/nn", { ... }}, { "/google/vision", { ... }} { "/org_foo/module_bar", { ... }} map<string, FunctionDefLib> named_lib; * If node[i].op is the name of one function in "library", node[i] is deemed as a function call. Otherwise, node[i].op must be a primitive operation supported by the runtime. Function call semantics: * The callee may start execution as soon as some of its inputs are ready. The caller may want to use Tuple() mechanism to ensure all inputs are ready in the same time. * The consumer of return values may start executing as soon as the return values the consumer depends on are ready. The consumer may want to use Tuple() mechanism to ensure the consumer does not start until all return values of the callee function are ready..tensorflow.FunctionDefLibrary library = 2; -
mergeLibrary
EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET. "library" provides user-defined functions. Naming: * library.function.name are in a flat namespace. NOTE: We may need to change it to be hierarchical to support different orgs. E.g., { "/google/nn", { ... }}, { "/google/vision", { ... }} { "/org_foo/module_bar", { ... }} map<string, FunctionDefLib> named_lib; * If node[i].op is the name of one function in "library", node[i] is deemed as a function call. Otherwise, node[i].op must be a primitive operation supported by the runtime. Function call semantics: * The callee may start execution as soon as some of its inputs are ready. The caller may want to use Tuple() mechanism to ensure all inputs are ready in the same time. * The consumer of return values may start executing as soon as the return values the consumer depends on are ready. The consumer may want to use Tuple() mechanism to ensure the consumer does not start until all return values of the callee function are ready..tensorflow.FunctionDefLibrary library = 2; -
clearLibrary
EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET. "library" provides user-defined functions. Naming: * library.function.name are in a flat namespace. NOTE: We may need to change it to be hierarchical to support different orgs. E.g., { "/google/nn", { ... }}, { "/google/vision", { ... }} { "/org_foo/module_bar", { ... }} map<string, FunctionDefLib> named_lib; * If node[i].op is the name of one function in "library", node[i] is deemed as a function call. Otherwise, node[i].op must be a primitive operation supported by the runtime. Function call semantics: * The callee may start execution as soon as some of its inputs are ready. The caller may want to use Tuple() mechanism to ensure all inputs are ready in the same time. * The consumer of return values may start executing as soon as the return values the consumer depends on are ready. The consumer may want to use Tuple() mechanism to ensure the consumer does not start until all return values of the callee function are ready..tensorflow.FunctionDefLibrary library = 2; -
getLibraryBuilder
EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET. "library" provides user-defined functions. Naming: * library.function.name are in a flat namespace. NOTE: We may need to change it to be hierarchical to support different orgs. E.g., { "/google/nn", { ... }}, { "/google/vision", { ... }} { "/org_foo/module_bar", { ... }} map<string, FunctionDefLib> named_lib; * If node[i].op is the name of one function in "library", node[i] is deemed as a function call. Otherwise, node[i].op must be a primitive operation supported by the runtime. Function call semantics: * The callee may start execution as soon as some of its inputs are ready. The caller may want to use Tuple() mechanism to ensure all inputs are ready in the same time. * The consumer of return values may start executing as soon as the return values the consumer depends on are ready. The consumer may want to use Tuple() mechanism to ensure the consumer does not start until all return values of the callee function are ready..tensorflow.FunctionDefLibrary library = 2; -
getLibraryOrBuilder
EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET. "library" provides user-defined functions. Naming: * library.function.name are in a flat namespace. NOTE: We may need to change it to be hierarchical to support different orgs. E.g., { "/google/nn", { ... }}, { "/google/vision", { ... }} { "/org_foo/module_bar", { ... }} map<string, FunctionDefLib> named_lib; * If node[i].op is the name of one function in "library", node[i] is deemed as a function call. Otherwise, node[i].op must be a primitive operation supported by the runtime. Function call semantics: * The callee may start execution as soon as some of its inputs are ready. The caller may want to use Tuple() mechanism to ensure all inputs are ready in the same time. * The consumer of return values may start executing as soon as the return values the consumer depends on are ready. The consumer may want to use Tuple() mechanism to ensure the consumer does not start until all return values of the callee function are ready..tensorflow.FunctionDefLibrary library = 2;- Specified by:
getLibraryOrBuilderin interfaceGraphDefOrBuilder
-
setUnknownFields
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<GraphDef.Builder>
-
mergeUnknownFields
public final GraphDef.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<GraphDef.Builder>
-