From d12b00dae7e4279a139dedaf0b23709dd0312a77 Mon Sep 17 00:00:00 2001 From: Tiago Freitas Pereira <tiagofrepereira@gmail.com> Date: Tue, 31 Oct 2017 09:31:18 +0100 Subject: [PATCH] Updated the LFW to tfrecord script to the new feature format --- bob/learn/tensorflow/script/lfw_db_to_tfrecords.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bob/learn/tensorflow/script/lfw_db_to_tfrecords.py b/bob/learn/tensorflow/script/lfw_db_to_tfrecords.py index 7999b635..91dc27b1 100755 --- a/bob/learn/tensorflow/script/lfw_db_to_tfrecords.py +++ b/bob/learn/tensorflow/script/lfw_db_to_tfrecords.py @@ -95,8 +95,10 @@ def main(argv=None): data = bob.io.image.to_matplotlib(bob.io.base.load(path)).astype(data_type) data = data.tostring() - feature = {'train/data': _bytes_feature(data), - 'train/label': _int64_feature(file_to_label(client_ids, f))} + feature = {'data': _bytes_feature(data), + 'label': _int64_feature(file_to_label(client_ids, f)), + 'key': _bytes_feature(str(f.path)), + } example = tf.train.Example(features=tf.train.Features(feature=feature)) writer.write(example.SerializeToString()) -- GitLab