Package org.tensorflow.framework
Class GraphDef.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<GraphDef.Builder>
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,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 TypeMethodDescriptionaddAllNode(Iterable<? extends NodeDef> values) repeated .tensorflow.NodeDef node = 1;repeated .tensorflow.NodeDef node = 1;addNode(int index, NodeDef.Builder builderForValue) repeated .tensorflow.NodeDef node = 1;repeated .tensorflow.NodeDef node = 1;addNode(NodeDef.Builder builderForValue) repeated .tensorflow.NodeDef node = 1;repeated .tensorflow.NodeDef node = 1;addNodeBuilder(int index) repeated .tensorflow.NodeDef node = 1;addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()Stack traces for the nodes in this graph.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) "library" provides user-defined functions.repeated .tensorflow.NodeDef node = 1;clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) Deprecated.tensorflow.GraphDef.version is deprecated.Compatibility versions of the graph.clone()Stack traces for the nodes in this graph.Stack traces for the nodes in this graph.Stack traces for the nodes in this graph.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.Descriptor"library" provides user-defined functions."library" provides user-defined functions."library" provides user-defined functions.getNode(int index) repeated .tensorflow.NodeDef node = 1;getNodeBuilder(int index) repeated .tensorflow.NodeDef node = 1;repeated .tensorflow.NodeDef node = 1;intrepeated .tensorflow.NodeDef node = 1;repeated .tensorflow.NodeDef node = 1;getNodeOrBuilder(int index) repeated .tensorflow.NodeDef node = 1;List<? extends NodeDefOrBuilder> repeated .tensorflow.NodeDef node = 1;intDeprecated.tensorflow.GraphDef.version is deprecated.Compatibility versions of the graph.Compatibility versions of the graph.Compatibility versions of the graph.booleanStack traces for the nodes in this graph.boolean"library" provides user-defined functions.booleanCompatibility versions of the graph.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeDebugInfo(GraphDebugInfo value) Stack traces for the nodes in this graph.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeLibrary(FunctionDefLibrary value) "library" provides user-defined functions.final GraphDef.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) mergeVersions(VersionDef value) Compatibility versions of the graph.removeNode(int index) repeated .tensorflow.NodeDef node = 1;setDebugInfo(GraphDebugInfo value) Stack traces for the nodes in this graph.setDebugInfo(GraphDebugInfo.Builder builderForValue) Stack traces for the nodes in this graph.setLibrary(FunctionDefLibrary value) "library" provides user-defined functions.setLibrary(FunctionDefLibrary.Builder builderForValue) "library" provides user-defined functions.repeated .tensorflow.NodeDef node = 1;setNode(int index, NodeDef.Builder builderForValue) repeated .tensorflow.NodeDef node = 1;setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) final GraphDef.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setVersion(int value) Deprecated.tensorflow.GraphDef.version is deprecated.setVersions(VersionDef value) Compatibility versions of the graph.setVersions(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, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
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, 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, 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, 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 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:
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.tensorflow.GraphDef.version is deprecated. See tensorflow/core/framework/graph.proto;l=43Deprecated 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.tensorflow.GraphDef.version is deprecated. See tensorflow/core/framework/graph.proto;l=43Deprecated 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.tensorflow.GraphDef.version is deprecated. See tensorflow/core/framework/graph.proto;l=43Deprecated 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()"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
"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
"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
"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
"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
"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
"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
"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
-
hasDebugInfo
public boolean hasDebugInfo()Stack traces for the nodes in this graph.
.tensorflow.GraphDebugInfo debug_info = 5;- Specified by:
hasDebugInfoin interfaceGraphDefOrBuilder- Returns:
- Whether the debugInfo field is set.
-
getDebugInfo
Stack traces for the nodes in this graph.
.tensorflow.GraphDebugInfo debug_info = 5;- Specified by:
getDebugInfoin interfaceGraphDefOrBuilder- Returns:
- The debugInfo.
-
setDebugInfo
Stack traces for the nodes in this graph.
.tensorflow.GraphDebugInfo debug_info = 5; -
setDebugInfo
Stack traces for the nodes in this graph.
.tensorflow.GraphDebugInfo debug_info = 5; -
mergeDebugInfo
Stack traces for the nodes in this graph.
.tensorflow.GraphDebugInfo debug_info = 5; -
clearDebugInfo
Stack traces for the nodes in this graph.
.tensorflow.GraphDebugInfo debug_info = 5; -
getDebugInfoBuilder
Stack traces for the nodes in this graph.
.tensorflow.GraphDebugInfo debug_info = 5; -
getDebugInfoOrBuilder
Stack traces for the nodes in this graph.
.tensorflow.GraphDebugInfo debug_info = 5;- Specified by:
getDebugInfoOrBuilderin interfaceGraphDefOrBuilder
-
setUnknownFields
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<GraphDef.Builder>
-
mergeUnknownFields
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<GraphDef.Builder>
-