Home | History | Annotate | only in /external/tensorflow/tensorflow/contrib/data
Up to higher level directory
NameDateSize
__init__.py21-Aug-20183K
BUILD21-Aug-20181.2K
kernels/21-Aug-2018
ops/21-Aug-2018
python/21-Aug-2018
README.md21-Aug-20181.7K

README.md

      1 `tf.contrib.data` API
      2 =====================
      3 
      4 NOTE: The `tf.contrib.data` module has been deprecated. Use `tf.data` instead.
      5 We are continuing to support existing code using the `tf.contrib.data` APIs in
      6 the current version of TensorFlow, but will eventually remove support. The
      7 `tf.data` APIs are subject to backwards compatibility guarantees.
      8 
      9 Porting your code to `tf.data`
     10 ------------------------------
     11 
     12 The `tf.contrib.data.Dataset` class has been renamed to `tf.data.Dataset`, and
     13 the `tf.contrib.data.Iterator` class has been renamed to `tf.data.Iterator`.
     14 Most code can be ported by removing `.contrib` from the names of the classes.
     15 However, there are some small differences, which are outlined below.
     16 
     17 The arguments accepted by the `Dataset.map()` transformation have changed:
     18 
     19 * `dataset.map(..., num_threads=T)` is now `dataset.map(num_parallel_calls=T)`.
     20 * `dataset.map(..., output_buffer_size=B)` is now
     21   `dataset.map(...).prefetch(B)`.
     22 
     23 Some transformations have been removed from `tf.data.Dataset`, and you must
     24 instead apply them using `Dataset.apply()` transformation. The full list of
     25 changes is as follows:
     26 
     27 * `dataset.dense_to_sparse_batch(...)` is now
     28   `dataset.apply(tf.contrib.data.dense_to_sparse_batch(...)`.
     29 * `dataset.enumerate(...)` is now
     30   `dataset.apply(tf.contrib.data.enumerate_dataset(...))`.
     31 * `dataset.group_by_window(...)` is now
     32   `dataset.apply(tf.contrib.data.group_by_window(...))`.
     33 * `dataset.ignore_errors()` is now
     34   `dataset.apply(tf.contrib.data.ignore_errors())`.
     35 * `dataset.unbatch()` is now `dataset.apply(tf.contrib.data.unbatch())`.
     36 
     37 The `Dataset.make_dataset_resource()` and `Iterator.dispose_op()` methods have
     38 been removed from the API. Please open a GitHub issue if you have a need for
     39 either of these.
     40