public final class GraphOperationBuilder extends Object implements OperationBuilder
| Modifier and Type | Method and Description |
|---|---|
GraphOperationBuilder |
addControlInput(Operation control)
Ensure that the operation does not execute before the control operation does.
|
GraphOperationBuilder |
addInput(Output<?> input)
Add the output of another operation as the next input of the operation being built.
|
GraphOperationBuilder |
addInputList(Output<?>[] inputs)
Add the outputs of another operation as the next inputs of the operation being built.
|
GraphOperation |
build()
Add the
GraphOperation being built to the Graph. |
GraphOperationBuilder |
setAttr(String name,
boolean value)
Set the boolean value of an attribute of the operation being built.
|
GraphOperationBuilder |
setAttr(String name,
boolean[] value)
Set the boolean values of an attribute of the operation being built.
|
GraphOperationBuilder |
setAttr(String name,
byte[] value)
Set the byte values of an attribute of the operation being built.
|
GraphOperationBuilder |
setAttr(String name,
DataType value)
Set the type value of an attribute of the operation being built.
|
GraphOperationBuilder |
setAttr(String name,
DataType[] value)
Set the type values of an attribute of the operation being built.
|
GraphOperationBuilder |
setAttr(String name,
float value)
Set the float value of an attribute of the operation being built.
|
GraphOperationBuilder |
setAttr(String name,
float[] value)
Set the float values of an attribute of the operation being built.
|
GraphOperationBuilder |
setAttr(String name,
long value)
Set the long value of an attribute of the operation being built.
|
GraphOperationBuilder |
setAttr(String name,
long[] value)
Set the long values of an attribute of the operation being built.
|
GraphOperationBuilder |
setAttr(String name,
Shape value)
Set the shape value of an attribute of the operation being built.
|
GraphOperationBuilder |
setAttr(String name,
Shape[] value)
Set the shape values of an attribute of the operation being built.
|
GraphOperationBuilder |
setAttr(String name,
String value)
Set the string value of an attribute of the operation being built.
|
GraphOperationBuilder |
setAttr(String name,
String[] value)
Set the string values of an attribute of the operation being built.
|
GraphOperationBuilder |
setAttr(String name,
Tensor<?> value)
Set the tensor value of an attribute of the operation being built.
|
GraphOperationBuilder |
setAttr(String name,
Tensor<?>[] value)
Set the tensor values of an attribute of the operation being built.
|
GraphOperationBuilder |
setDevice(String device)
Set the device requested for computing the operation being built.
|
public GraphOperation build()
GraphOperation being built to the Graph.
The OperationBuilder is not usable after build() returns.
build in interface OperationBuilderpublic GraphOperationBuilder addControlInput(Operation control)
OperationBuilderA control input is an Operation that must be executed before running the operation currently being built.
For example, an Assert operation may be added as a control input for this operation. The Assert now behaves as a pre-condition that will always verify itself before running the operation.
addControlInput in interface OperationBuildercontrol - operation that must be executed before running this operation.public GraphOperationBuilder addInput(Output<?> input)
OperationBuilderaddInput in interface OperationBuilderinput - Output supposed to be the input of the operation being built.public GraphOperationBuilder addInputList(Output<?>[] inputs)
OperationBuilderaddInputList in interface OperationBuilderinputs - list of Output supposed to be the inputs of the operation being built.public GraphOperationBuilder setDevice(String device)
OperationBuildersetDevice in interface OperationBuilderdevice - the requested device, as a stringpublic GraphOperationBuilder setAttr(String name, String value)
OperationBuildersetAttr in interface OperationBuildername - attribute namevalue - attribute valuepublic GraphOperationBuilder setAttr(String name, byte[] value)
OperationBuildersetAttr in interface OperationBuildername - attribute namevalue - attribute valuespublic GraphOperationBuilder setAttr(String name, long value)
OperationBuildersetAttr in interface OperationBuildername - attribute namevalue - attribute valuepublic GraphOperationBuilder setAttr(String name, long[] value)
OperationBuildersetAttr in interface OperationBuildername - attribute namevalue - attribute valuespublic GraphOperationBuilder setAttr(String name, float value)
OperationBuildersetAttr in interface OperationBuildername - attribute namevalue - attribute valuepublic GraphOperationBuilder setAttr(String name, float[] value)
OperationBuildersetAttr in interface OperationBuildername - attribute namevalue - attribute valuespublic GraphOperationBuilder setAttr(String name, boolean value)
OperationBuildersetAttr in interface OperationBuildername - attribute namevalue - attribute valuepublic GraphOperationBuilder setAttr(String name, boolean[] value)
OperationBuildersetAttr in interface OperationBuildername - attribute namevalue - attribute valuespublic GraphOperationBuilder setAttr(String name, DataType value)
OperationBuildersetAttr in interface OperationBuildername - attribute namevalue - attribute valuepublic GraphOperationBuilder setAttr(String name, DataType[] value)
OperationBuildersetAttr in interface OperationBuildername - attribute namevalue - attribute valuespublic GraphOperationBuilder setAttr(String name, Tensor<?> value)
OperationBuildersetAttr in interface OperationBuildername - attribute namevalue - attribute valuepublic GraphOperationBuilder setAttr(String name, Tensor<?>[] value)
OperationBuildersetAttr in interface OperationBuildername - attribute namevalue - attribute valuespublic GraphOperationBuilder setAttr(String name, Shape value)
OperationBuildersetAttr in interface OperationBuildername - attribute namevalue - attribute valuepublic GraphOperationBuilder setAttr(String name, Shape[] value)
OperationBuildersetAttr in interface OperationBuildername - attribute namevalue - attribute valuespublic GraphOperationBuilder setAttr(String name, String[] value)
OperationBuildersetAttr in interface OperationBuildername - attribute namevalue - attribute valuesCopyright © 2015–2019. All rights reserved.