Returns a dataset as input dataset Returns: A local dataset of work items.
(self)
| 424 | return proxy |
| 425 | |
| 426 | def input_dataset(self): |
| 427 | """Returns a dataset as input dataset |
| 428 | |
| 429 | Returns: |
| 430 | A local dataset of work items. |
| 431 | """ |
| 432 | proxy = self.input_producer() |
| 433 | next_work = lambda _: array_ops.reshape(proxy.dequeue(), []) |
| 434 | with ops.name_scope(self.name): |
| 435 | with ops.device(self._local_device): |
| 436 | dataset = dataset_ops.Dataset.from_tensors(0).repeat() |
| 437 | dataset = dataset.map(next_work) |
| 438 | return dataset |
| 439 | |
| 440 | def add_summary(self): |
| 441 | """Gets size of the work queue. |