Skip to content

Commit b96c848

Browse files
committed
FIX: decode_csv did not place features in a single tensor.
- this broke with tf 1.5, where we needed to use tf.stack on the list of features. Probably, this stacking before was done internally in dataset_ops. Now, they have changed it to treating it as a tuple which breaks things lateron.
1 parent 8af336b commit b96c848

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DataDrivenSampler/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ def decode_csv_line(line, defaults):
349349
items = tf.decode_csv(line, list(defaults.values()))
350350

351351
# reshape into proper tensors
352-
features = items[0:-1]
352+
features = tf.stack(items[0:-1])
353353
label = tf.reshape(tf.convert_to_tensor(items[-1], dtype=tf.int32), [1])
354354

355355
# return last element as label, rest as features

0 commit comments

Comments
 (0)