Skip to content

Commit 6b210bf

Browse files
committed
Fix validateTags() bug
empty string array is a valid tag. TF 1.x model does not have any tags
1 parent a4f32dc commit 6b210bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ opts, runOpts, new BytePointer(exportDir), new PointerPointer(tags),
429429
}
430430

431431
private static void validateTags(String[] tags) {
432-
if (tags == null || tags.length == 0 || Arrays.stream(tags).anyMatch(t -> t == null || t.isEmpty())) {
432+
if (tags == null || Arrays.stream(tags).anyMatch(t -> t == null || t.isEmpty())) {
433433
throw new IllegalArgumentException("Invalid tags: " + Arrays.toString(tags));
434434
}
435435
}

0 commit comments

Comments
 (0)