Package org.tensorflow.framework
Class GraphOptions.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<GraphOptions.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
org.tensorflow.framework.GraphOptions.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable,GraphOptionsOrBuilder
- Enclosing class:
GraphOptions
public static final class GraphOptions.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
implements GraphOptionsOrBuilder
Protobuf type
tensorflow.GraphOptions-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()The number of steps to run before returning a cost model detailing the memory usage and performance of each node of the graph. 0 means no cost model.The number of steps to skip before collecting statistics for the cost model.If true, transfer float values between processes as bfloat16.If true, use control flow to schedule the activation of Recv nodes.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) Annotate each Node with Op output shape data, to the extent it can be statically inferred.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) Options controlling how graph is optimized.Only place the subgraphs that are run, rather than the entire graph.Options that control the type and amount of graph rewriting.If > 0, record a timeline every this many steps.clone()longThe number of steps to run before returning a cost model detailing the memory usage and performance of each node of the graph. 0 means no cost model.longThe number of steps to skip before collecting statistics for the cost model.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorbooleanIf true, transfer float values between processes as bfloat16.booleanIf true, use control flow to schedule the activation of Recv nodes.booleanAnnotate each Node with Op output shape data, to the extent it can be statically inferred.Options controlling how graph is optimized.Options controlling how graph is optimized.Options controlling how graph is optimized.booleanOnly place the subgraphs that are run, rather than the entire graph.Options that control the type and amount of graph rewriting.Options that control the type and amount of graph rewriting.Options that control the type and amount of graph rewriting.intIf > 0, record a timeline every this many steps.booleanOptions controlling how graph is optimized.booleanOptions that control the type and amount of graph rewriting.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(GraphOptions other) Options controlling how graph is optimized.Options that control the type and amount of graph rewriting.final GraphOptions.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setBuildCostModel(long value) The number of steps to run before returning a cost model detailing the memory usage and performance of each node of the graph. 0 means no cost model.setBuildCostModelAfter(long value) The number of steps to skip before collecting statistics for the cost model.setEnableBfloat16Sendrecv(boolean value) If true, transfer float values between processes as bfloat16.setEnableRecvScheduling(boolean value) If true, use control flow to schedule the activation of Recv nodes.setInferShapes(boolean value) Annotate each Node with Op output shape data, to the extent it can be statically inferred.Options controlling how graph is optimized.setOptimizerOptions(OptimizerOptions.Builder builderForValue) Options controlling how graph is optimized.setPlacePrunedGraph(boolean value) Only place the subgraphs that are run, rather than the entire graph.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setRewriteOptions(RewriterConfig value) Options that control the type and amount of graph rewriting.setRewriteOptions(RewriterConfig.Builder builderForValue) Options that control the type and amount of graph rewriting.setTimelineStep(int value) If > 0, record a timeline every this many steps.final GraphOptions.BuildersetUnknownFields(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, 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<GraphOptions.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<GraphOptions.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<GraphOptions.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<GraphOptions.Builder>
-
setField
public GraphOptions.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<GraphOptions.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
-
setRepeatedField
public GraphOptions.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<GraphOptions.Builder>
-
addRepeatedField
public GraphOptions.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<GraphOptions.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<GraphOptions.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
-
mergeFrom
public GraphOptions.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<GraphOptions.Builder>- Throws:
IOException
-
getEnableRecvScheduling
public boolean getEnableRecvScheduling()If true, use control flow to schedule the activation of Recv nodes. (Currently ignored.)
bool enable_recv_scheduling = 2;- Specified by:
getEnableRecvSchedulingin interfaceGraphOptionsOrBuilder- Returns:
- The enableRecvScheduling.
-
setEnableRecvScheduling
If true, use control flow to schedule the activation of Recv nodes. (Currently ignored.)
bool enable_recv_scheduling = 2;- Parameters:
value- The enableRecvScheduling to set.- Returns:
- This builder for chaining.
-
clearEnableRecvScheduling
If true, use control flow to schedule the activation of Recv nodes. (Currently ignored.)
bool enable_recv_scheduling = 2;- Returns:
- This builder for chaining.
-
hasOptimizerOptions
public boolean hasOptimizerOptions()Options controlling how graph is optimized.
.tensorflow.OptimizerOptions optimizer_options = 3;- Specified by:
hasOptimizerOptionsin interfaceGraphOptionsOrBuilder- Returns:
- Whether the optimizerOptions field is set.
-
getOptimizerOptions
Options controlling how graph is optimized.
.tensorflow.OptimizerOptions optimizer_options = 3;- Specified by:
getOptimizerOptionsin interfaceGraphOptionsOrBuilder- Returns:
- The optimizerOptions.
-
setOptimizerOptions
Options controlling how graph is optimized.
.tensorflow.OptimizerOptions optimizer_options = 3; -
setOptimizerOptions
Options controlling how graph is optimized.
.tensorflow.OptimizerOptions optimizer_options = 3; -
mergeOptimizerOptions
Options controlling how graph is optimized.
.tensorflow.OptimizerOptions optimizer_options = 3; -
clearOptimizerOptions
Options controlling how graph is optimized.
.tensorflow.OptimizerOptions optimizer_options = 3; -
getOptimizerOptionsBuilder
Options controlling how graph is optimized.
.tensorflow.OptimizerOptions optimizer_options = 3; -
getOptimizerOptionsOrBuilder
Options controlling how graph is optimized.
.tensorflow.OptimizerOptions optimizer_options = 3;- Specified by:
getOptimizerOptionsOrBuilderin interfaceGraphOptionsOrBuilder
-
getBuildCostModel
public long getBuildCostModel()The number of steps to run before returning a cost model detailing the memory usage and performance of each node of the graph. 0 means no cost model.
int64 build_cost_model = 4;- Specified by:
getBuildCostModelin interfaceGraphOptionsOrBuilder- Returns:
- The buildCostModel.
-
setBuildCostModel
The number of steps to run before returning a cost model detailing the memory usage and performance of each node of the graph. 0 means no cost model.
int64 build_cost_model = 4;- Parameters:
value- The buildCostModel to set.- Returns:
- This builder for chaining.
-
clearBuildCostModel
The number of steps to run before returning a cost model detailing the memory usage and performance of each node of the graph. 0 means no cost model.
int64 build_cost_model = 4;- Returns:
- This builder for chaining.
-
getBuildCostModelAfter
public long getBuildCostModelAfter()The number of steps to skip before collecting statistics for the cost model.
int64 build_cost_model_after = 9;- Specified by:
getBuildCostModelAfterin interfaceGraphOptionsOrBuilder- Returns:
- The buildCostModelAfter.
-
setBuildCostModelAfter
The number of steps to skip before collecting statistics for the cost model.
int64 build_cost_model_after = 9;- Parameters:
value- The buildCostModelAfter to set.- Returns:
- This builder for chaining.
-
clearBuildCostModelAfter
The number of steps to skip before collecting statistics for the cost model.
int64 build_cost_model_after = 9;- Returns:
- This builder for chaining.
-
getInferShapes
public boolean getInferShapes()Annotate each Node with Op output shape data, to the extent it can be statically inferred.
bool infer_shapes = 5;- Specified by:
getInferShapesin interfaceGraphOptionsOrBuilder- Returns:
- The inferShapes.
-
setInferShapes
Annotate each Node with Op output shape data, to the extent it can be statically inferred.
bool infer_shapes = 5;- Parameters:
value- The inferShapes to set.- Returns:
- This builder for chaining.
-
clearInferShapes
Annotate each Node with Op output shape data, to the extent it can be statically inferred.
bool infer_shapes = 5;- Returns:
- This builder for chaining.
-
getPlacePrunedGraph
public boolean getPlacePrunedGraph()Only place the subgraphs that are run, rather than the entire graph. This is useful for interactive graph building, where one might produce graphs that cannot be placed during the debugging process. In particular, it allows the client to continue work in a session after adding a node to a graph whose placement constraints are unsatisfiable.
bool place_pruned_graph = 6;- Specified by:
getPlacePrunedGraphin interfaceGraphOptionsOrBuilder- Returns:
- The placePrunedGraph.
-
setPlacePrunedGraph
Only place the subgraphs that are run, rather than the entire graph. This is useful for interactive graph building, where one might produce graphs that cannot be placed during the debugging process. In particular, it allows the client to continue work in a session after adding a node to a graph whose placement constraints are unsatisfiable.
bool place_pruned_graph = 6;- Parameters:
value- The placePrunedGraph to set.- Returns:
- This builder for chaining.
-
clearPlacePrunedGraph
Only place the subgraphs that are run, rather than the entire graph. This is useful for interactive graph building, where one might produce graphs that cannot be placed during the debugging process. In particular, it allows the client to continue work in a session after adding a node to a graph whose placement constraints are unsatisfiable.
bool place_pruned_graph = 6;- Returns:
- This builder for chaining.
-
getEnableBfloat16Sendrecv
public boolean getEnableBfloat16Sendrecv()If true, transfer float values between processes as bfloat16.
bool enable_bfloat16_sendrecv = 7;- Specified by:
getEnableBfloat16Sendrecvin interfaceGraphOptionsOrBuilder- Returns:
- The enableBfloat16Sendrecv.
-
setEnableBfloat16Sendrecv
If true, transfer float values between processes as bfloat16.
bool enable_bfloat16_sendrecv = 7;- Parameters:
value- The enableBfloat16Sendrecv to set.- Returns:
- This builder for chaining.
-
clearEnableBfloat16Sendrecv
If true, transfer float values between processes as bfloat16.
bool enable_bfloat16_sendrecv = 7;- Returns:
- This builder for chaining.
-
getTimelineStep
public int getTimelineStep()If > 0, record a timeline every this many steps. EXPERIMENTAL: This currently has no effect in MasterSession.
int32 timeline_step = 8;- Specified by:
getTimelineStepin interfaceGraphOptionsOrBuilder- Returns:
- The timelineStep.
-
setTimelineStep
If > 0, record a timeline every this many steps. EXPERIMENTAL: This currently has no effect in MasterSession.
int32 timeline_step = 8;- Parameters:
value- The timelineStep to set.- Returns:
- This builder for chaining.
-
clearTimelineStep
If > 0, record a timeline every this many steps. EXPERIMENTAL: This currently has no effect in MasterSession.
int32 timeline_step = 8;- Returns:
- This builder for chaining.
-
hasRewriteOptions
public boolean hasRewriteOptions()Options that control the type and amount of graph rewriting. Not currently configurable via the public Python API (i.e. there is no API stability guarantee if you import RewriterConfig explicitly).
.tensorflow.RewriterConfig rewrite_options = 10;- Specified by:
hasRewriteOptionsin interfaceGraphOptionsOrBuilder- Returns:
- Whether the rewriteOptions field is set.
-
getRewriteOptions
Options that control the type and amount of graph rewriting. Not currently configurable via the public Python API (i.e. there is no API stability guarantee if you import RewriterConfig explicitly).
.tensorflow.RewriterConfig rewrite_options = 10;- Specified by:
getRewriteOptionsin interfaceGraphOptionsOrBuilder- Returns:
- The rewriteOptions.
-
setRewriteOptions
Options that control the type and amount of graph rewriting. Not currently configurable via the public Python API (i.e. there is no API stability guarantee if you import RewriterConfig explicitly).
.tensorflow.RewriterConfig rewrite_options = 10; -
setRewriteOptions
Options that control the type and amount of graph rewriting. Not currently configurable via the public Python API (i.e. there is no API stability guarantee if you import RewriterConfig explicitly).
.tensorflow.RewriterConfig rewrite_options = 10; -
mergeRewriteOptions
Options that control the type and amount of graph rewriting. Not currently configurable via the public Python API (i.e. there is no API stability guarantee if you import RewriterConfig explicitly).
.tensorflow.RewriterConfig rewrite_options = 10; -
clearRewriteOptions
Options that control the type and amount of graph rewriting. Not currently configurable via the public Python API (i.e. there is no API stability guarantee if you import RewriterConfig explicitly).
.tensorflow.RewriterConfig rewrite_options = 10; -
getRewriteOptionsBuilder
Options that control the type and amount of graph rewriting. Not currently configurable via the public Python API (i.e. there is no API stability guarantee if you import RewriterConfig explicitly).
.tensorflow.RewriterConfig rewrite_options = 10; -
getRewriteOptionsOrBuilder
Options that control the type and amount of graph rewriting. Not currently configurable via the public Python API (i.e. there is no API stability guarantee if you import RewriterConfig explicitly).
.tensorflow.RewriterConfig rewrite_options = 10;- Specified by:
getRewriteOptionsOrBuilderin interfaceGraphOptionsOrBuilder
-
setUnknownFields
public final GraphOptions.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
-
mergeUnknownFields
public final GraphOptions.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
-