Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit 1d73633

Browse files
committed
Make sure image labels are ints
Sometimes these are numpy.int64, which doesn't work at least in Python 3.
1 parent 8061369 commit 1d73633

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensor2tensor/data_generators/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def image_generator(images, labels):
6868
yield {
6969
"image/encoded": [enc_string],
7070
"image/format": ["png"],
71-
"image/class/label": [label],
71+
"image/class/label": [int(label)],
7272
"image/height": [height],
7373
"image/width": [width]
7474
}

0 commit comments

Comments
 (0)