Skip to content
Snippets Groups Projects

Add support for databases which contain more than one sample in one file

Closed Amir MOHAMMADI requested to merge mutilsample into master
1 unresolved thread
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -96,7 +96,7 @@ def _int64_feature(value):
def write_a_sample(writer, data, label):
feature = {'train/data': _bytes_feature(data),
feature = {'train/data': _bytes_feature(data.astype('float32').tostring()),
'train/label': _int64_feature(label)}
example = tf.train.Example(features=tf.train.Features(feature=feature))
@@ -143,7 +143,7 @@ def main(argv=None):
logger.info('Processing file %d out of %d', i + 1, n_files)
path = f.make_path(data_dir, data_extension)
data = reader(path).astype('float32').tostring()
data = reader(path)
label = file_to_label(f)
if one_file_one_sample:
Loading