diff --git a/.gitignore b/.gitignore index b9391f86945..c3863206a8c 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,7 @@ gradleBuild **/target .tf_configure.bazelrc .clwb/ + +# Deployment Files +settings.xml +pom.xml.asc diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/SavedModelBundle.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/SavedModelBundle.java index cdf6c2bfc5a..4295dbb6c4a 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/SavedModelBundle.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/SavedModelBundle.java @@ -430,7 +430,7 @@ public List signatures() { * @return object that can be used to make calls to a function * @throws IllegalArgumentException if {@code signatureKey} is not found in this saved model. */ - public TensorFunction function(String signatureKey) { + public SessionFunction function(String signatureKey) { SessionFunction function = functions.get(signatureKey); if (function == null) { throw new IllegalArgumentException( @@ -444,7 +444,7 @@ public TensorFunction function(String signatureKey) { * *

All functions use the bundle's underlying session. */ - public List functions() { + public List functions() { return new ArrayList<>(functions.values()); } diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Session.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Session.java index c1fdbf10a17..71fdcec3f41 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Session.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Session.java @@ -397,12 +397,13 @@ public Runner fetch(Operand operand) { * Make {@link #run()} execute {@code operation}, but not return any evaluated {@link Tensor * Tensors}. * - * @param operation the string name of the operation to execute + * @param operation Is either the string name of the operation or it is a string of the form + * operation_name:output_index, where output_index will simply be ignored. * @return this session runner * @throws IllegalArgumentException if no operation exists with the provided name */ public Runner addTarget(String operation) { - return addTarget(graph.operationOrThrow(operation)); + return addTarget(graph.outputOrThrow(operation)); } /**