MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / __init__

Method __init__

tensorpack/input_source/input_source.py:194–207  ·  view source on GitHub ↗

Args: ds(DataFlow): the input DataFlow. queue (tf.QueueBase): A :class:`tf.QueueBase` whose type should match the corresponding input signature of the model. Defaults to a FIFO queue of size 50.

(self, ds, queue=None)

Source from the content-addressed store, hash-verified

192 """
193
194 def __init__(self, ds, queue=None):
195 """
196 Args:
197 ds(DataFlow): the input DataFlow.
198 queue (tf.QueueBase): A :class:`tf.QueueBase` whose type
199 should match the corresponding input signature of the model.
200 Defaults to a FIFO queue of size 50.
201 """
202 if not isinstance(ds, DataFlow):
203 raise ValueError("QueueInput takes a DataFlow! Got {}".format(ds))
204 self.queue = queue
205 self.ds = ds
206 self._inf_ds = RepeatedData(ds, -1)
207 self._started = False
208
209 def _size(self):
210 return len(self.ds)

Callers

nothing calls this directly

Calls 2

RepeatedDataClass · 0.85
formatMethod · 0.80

Tested by

no test coverage detected