Commit 8773ca70 authored by Jiri Simsa's avatar Jiri Simsa Committed by TensorFlower Gardener
Browse files

[tf.data] Switching tf.data functions to use `defun`, providing an escape...

[tf.data] Switching tf.data functions to use `defun`, providing an escape hatch to continue using the legacy `Defun`.

There are subtle differences between the implementation of `defun` and `Defun` (such as resources handling or control flow) and it is possible that input pipelines that use control flow or resources in their functions might be affected by this change. To migrate majority of existing pipelines to the recommended way of creating functions in TF 2.0 world, while allowing (a small number of) existing pipelines to continue relying on the deprecated behavior, this CL provides an escape hatch.

If your input pipeline is affected by this CL, it should apply the escape hatch by replacing `foo.map(...)` with `foo.map_with_legacy_function(...)`.

PiperOrigin-RevId: 232926599
parent 5b7063a3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment