A transformation that models performance. Returns: A `Dataset` transformation function, which can be passed to `tf.data.Dataset.apply`.
()
| 45 | |
| 46 | |
| 47 | def model(): |
| 48 | """A transformation that models performance. |
| 49 | |
| 50 | Returns: |
| 51 | A `Dataset` transformation function, which can be passed to |
| 52 | `tf.data.Dataset.apply`. |
| 53 | """ |
| 54 | |
| 55 | def _apply_fn(dataset): |
| 56 | """Function from `Dataset` to `Dataset` that applies the transformation.""" |
| 57 | return dataset_ops._ModelDataset(dataset) # pylint: disable=protected-access |
| 58 | |
| 59 | return _apply_fn |
| 60 | |
| 61 | |
| 62 | def non_serializable(): |
no outgoing calls