Skip to content

Instantly share code, notes, and snippets.

View Images2TFRecords.py
import os
import tensorflow as tf
from PIL import Image
from functools import partial
def read_tfrecord(example):
tfrecord = {
"image": tf.io.FixedLenFeature([], tf.string),
"label": tf.io.FixedLenFeature([], tf.int64),