Skip to content

Commit d2b8be0

Browse files
committed
Use generated op names in ConcreteFunction
Signed-off-by: Ryan Nett <JNett96@gmail.com>
1 parent ec92d15 commit d2b8be0

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/ConcreteFunction.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
import org.tensorflow.op.Scope;
4343
import org.tensorflow.op.core.Placeholder;
4444
import org.tensorflow.op.core.PlaceholderWithDefault;
45+
import org.tensorflow.op.core.StatefulPartitionedCall;
46+
import org.tensorflow.op.core.StatelessPartitionedCall;
4547
import org.tensorflow.proto.framework.AttrValue;
4648
import org.tensorflow.proto.framework.DataType;
4749
import org.tensorflow.proto.framework.FunctionDef;
@@ -207,11 +209,6 @@ public String toString() {
207209
return signature.toString();
208210
}
209211

210-
// TODO migrate to the actual ops once they are generated
211-
public static final String CALL_OP = "PartitionedCall";
212-
// TODO migrate to the actual ops once they are generated
213-
public static final String STATEFUL_CALL_OP = "StatefulPartitionedCall";
214-
215212
/**
216213
* Calls the function in an execution environment, adding its graph as a function if it isn't
217214
* already present. The inputs and outputs are keyed by the names set in the {@code Signature}.
@@ -255,7 +252,9 @@ public Map<String, Operand<?>> call(Scope scope, Map<String, Operand<?>> argumen
255252
OperationBuilder opBuilder =
256253
scope
257254
.env()
258-
.opBuilder(isStateful() ? STATEFUL_CALL_OP : CALL_OP, scope.makeOpName(displayName));
255+
.opBuilder(
256+
isStateful() ? StatefulPartitionedCall.OP_NAME : StatelessPartitionedCall.OP_NAME,
257+
scope.makeOpName(displayName));
259258

260259
opBuilder.addInputList(inputs);
261260

0 commit comments

Comments
 (0)