Append operations to read_net that will read a batch from the underlying data soruce. Operations added to `read_net` must be thread safe and atomic, that is, it should be possible to clone `read_net` and run multiple instances of it in parallel. Args:
(self, read_net)
| 69 | return nets, should_stop, fields |
| 70 | |
| 71 | def read(self, read_net): |
| 72 | """Append operations to read_net that will read a batch from the |
| 73 | underlying data soruce. |
| 74 | |
| 75 | Operations added to `read_net` must be thread safe and atomic, that is, |
| 76 | it should be possible to clone `read_net` and run multiple instances of |
| 77 | it in parallel. |
| 78 | |
| 79 | Args: |
| 80 | read_net: the net that will be appended with read operations |
| 81 | |
| 82 | Returns: |
| 83 | A tuple (should_stop, fields), with: |
| 84 | should_stop: BlobReference pointing to a boolean scalar |
| 85 | blob that indicates whether the read operation |
| 86 | was succesfull or whether the end of data has |
| 87 | been reached. |
| 88 | fields: A tuple of BlobReference containing the latest batch |
| 89 | of data that was read. |
| 90 | """ |
| 91 | raise NotImplementedError('Readers must implement `read`.') |
| 92 | |
| 93 | def reset(self, net): |
| 94 | """Append operations to `net` that will reset the reader. |
no outgoing calls