Package org.tensorflow.framework
Class GraphOptions.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- 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,java.lang.Cloneable,GraphOptionsOrBuilder
- Enclosing class:
- GraphOptions
public static final class GraphOptions.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder> implements GraphOptionsOrBuilder
Protobuf typetensorflow.GraphOptions
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GraphOptions.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)GraphOptionsbuild()GraphOptionsbuildPartial()GraphOptions.Builderclear()GraphOptions.BuilderclearBuildCostModel()The number of steps to run before returning a cost model detailing the memory usage and performance of each node of the graph.GraphOptions.BuilderclearBuildCostModelAfter()The number of steps to skip before collecting statistics for the cost model.GraphOptions.BuilderclearEnableBfloat16Sendrecv()If true, transfer float values between processes as bfloat16.GraphOptions.BuilderclearEnableRecvScheduling()If true, use control flow to schedule the activation of Recv nodes.GraphOptions.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)GraphOptions.BuilderclearInferShapes()Annotate each Node with Op output shape data, to the extent it can be statically inferred.GraphOptions.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)GraphOptions.BuilderclearOptimizerOptions()Options controlling how graph is optimized.GraphOptions.BuilderclearPlacePrunedGraph()Only place the subgraphs that are run, rather than the entire graph.GraphOptions.BuilderclearRewriteOptions()Options that control the type and amount of graph rewriting.GraphOptions.BuilderclearTimelineStep()If > 0, record a timeline every this many steps.GraphOptions.Builderclone()longgetBuildCostModel()The number of steps to run before returning a cost model detailing the memory usage and performance of each node of the graph.longgetBuildCostModelAfter()The number of steps to skip before collecting statistics for the cost model.GraphOptionsgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()booleangetEnableBfloat16Sendrecv()If true, transfer float values between processes as bfloat16.booleangetEnableRecvScheduling()If true, use control flow to schedule the activation of Recv nodes.booleangetInferShapes()Annotate each Node with Op output shape data, to the extent it can be statically inferred.OptimizerOptionsgetOptimizerOptions()Options controlling how graph is optimized.OptimizerOptions.BuildergetOptimizerOptionsBuilder()Options controlling how graph is optimized.OptimizerOptionsOrBuildergetOptimizerOptionsOrBuilder()Options controlling how graph is optimized.booleangetPlacePrunedGraph()Only place the subgraphs that are run, rather than the entire graph.RewriterConfiggetRewriteOptions()Options that control the type and amount of graph rewriting.RewriterConfig.BuildergetRewriteOptionsBuilder()Options that control the type and amount of graph rewriting.RewriterConfigOrBuildergetRewriteOptionsOrBuilder()Options that control the type and amount of graph rewriting.intgetTimelineStep()If > 0, record a timeline every this many steps.booleanhasOptimizerOptions()Options controlling how graph is optimized.booleanhasRewriteOptions()Options that control the type and amount of graph rewriting.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()GraphOptions.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)GraphOptions.BuildermergeFrom(com.google.protobuf.Message other)GraphOptions.BuildermergeFrom(GraphOptions other)GraphOptions.BuildermergeOptimizerOptions(OptimizerOptions value)Options controlling how graph is optimized.GraphOptions.BuildermergeRewriteOptions(RewriterConfig value)Options that control the type and amount of graph rewriting.GraphOptions.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)GraphOptions.BuildersetBuildCostModel(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.GraphOptions.BuildersetBuildCostModelAfter(long value)The number of steps to skip before collecting statistics for the cost model.GraphOptions.BuildersetEnableBfloat16Sendrecv(boolean value)If true, transfer float values between processes as bfloat16.GraphOptions.BuildersetEnableRecvScheduling(boolean value)If true, use control flow to schedule the activation of Recv nodes.GraphOptions.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)GraphOptions.BuildersetInferShapes(boolean value)Annotate each Node with Op output shape data, to the extent it can be statically inferred.GraphOptions.BuildersetOptimizerOptions(OptimizerOptions value)Options controlling how graph is optimized.GraphOptions.BuildersetOptimizerOptions(OptimizerOptions.Builder builderForValue)Options controlling how graph is optimized.GraphOptions.BuildersetPlacePrunedGraph(boolean value)Only place the subgraphs that are run, rather than the entire graph.GraphOptions.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)GraphOptions.BuildersetRewriteOptions(RewriterConfig value)Options that control the type and amount of graph rewriting.GraphOptions.BuildersetRewriteOptions(RewriterConfig.Builder builderForValue)Options that control the type and amount of graph rewriting.GraphOptions.BuildersetTimelineStep(int value)If > 0, record a timeline every this many steps.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, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeFrom, newUninitializedMessageException
-
-
-
-
Method Detail
-
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
public 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
public GraphOptions getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public GraphOptions build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public GraphOptions buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public GraphOptions.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, java.lang.Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
-
clearField
public GraphOptions.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
-
clearOneof
public GraphOptions.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- 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, java.lang.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, java.lang.Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
-
mergeFrom
public GraphOptions.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<GraphOptions.Builder>
-
mergeFrom
public GraphOptions.Builder mergeFrom(GraphOptions other)
-
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 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<GraphOptions.Builder>- Throws:
java.io.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
public GraphOptions.Builder setEnableRecvScheduling(boolean value)
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
public GraphOptions.Builder 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
public OptimizerOptions getOptimizerOptions()
Options controlling how graph is optimized.
.tensorflow.OptimizerOptions optimizer_options = 3;- Specified by:
getOptimizerOptionsin interfaceGraphOptionsOrBuilder- Returns:
- The optimizerOptions.
-
setOptimizerOptions
public GraphOptions.Builder setOptimizerOptions(OptimizerOptions value)
Options controlling how graph is optimized.
.tensorflow.OptimizerOptions optimizer_options = 3;
-
setOptimizerOptions
public GraphOptions.Builder setOptimizerOptions(OptimizerOptions.Builder builderForValue)
Options controlling how graph is optimized.
.tensorflow.OptimizerOptions optimizer_options = 3;
-
mergeOptimizerOptions
public GraphOptions.Builder mergeOptimizerOptions(OptimizerOptions value)
Options controlling how graph is optimized.
.tensorflow.OptimizerOptions optimizer_options = 3;
-
clearOptimizerOptions
public GraphOptions.Builder clearOptimizerOptions()
Options controlling how graph is optimized.
.tensorflow.OptimizerOptions optimizer_options = 3;
-
getOptimizerOptionsBuilder
public OptimizerOptions.Builder getOptimizerOptionsBuilder()
Options controlling how graph is optimized.
.tensorflow.OptimizerOptions optimizer_options = 3;
-
getOptimizerOptionsOrBuilder
public OptimizerOptionsOrBuilder 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
public GraphOptions.Builder 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.
int64 build_cost_model = 4;- Parameters:
value- The buildCostModel to set.- Returns:
- This builder for chaining.
-
clearBuildCostModel
public GraphOptions.Builder 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
public GraphOptions.Builder setBuildCostModelAfter(long value)
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
public GraphOptions.Builder 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
public GraphOptions.Builder setInferShapes(boolean value)
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
public GraphOptions.Builder 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
public GraphOptions.Builder setPlacePrunedGraph(boolean value)
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
public GraphOptions.Builder 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
public GraphOptions.Builder setEnableBfloat16Sendrecv(boolean value)
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
public GraphOptions.Builder 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
public GraphOptions.Builder setTimelineStep(int value)
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
public GraphOptions.Builder 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
public RewriterConfig 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
public GraphOptions.Builder setRewriteOptions(RewriterConfig value)
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
public GraphOptions.Builder setRewriteOptions(RewriterConfig.Builder builderForValue)
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
public GraphOptions.Builder mergeRewriteOptions(RewriterConfig value)
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
public GraphOptions.Builder 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
public RewriterConfig.Builder 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
public RewriterConfigOrBuilder 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>
-
-