mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 12:20:11 +01:00
[tf.contrib.data] map expects a nested structure.
Fixes #11786 PiperOrigin-RevId: 163359134
This commit is contained in:
parent
ddd8e21b7c
commit
2139e7d8b1
|
|
@ -548,8 +548,8 @@ labels = [0, 37, 29, 1, ...]
|
|||
|
||||
dataset = tf.contrib.data.Dataset.from_tensor_slices((filenames, labels))
|
||||
dataset = dataset.map(
|
||||
lambda filename, label: tf.py_func(
|
||||
_read_py_function, [filename, label], [tf.uint8, label.dtype]))
|
||||
lambda filename, label: tuple(tf.py_func(
|
||||
_read_py_function, [filename, label], [tf.uint8, label.dtype])))
|
||||
dataset = dataset.map(_resize_function)
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user