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

Method __init__

tensorpack/dataflow/common.py:426–438  ·  view source on GitHub ↗

Args: df_lists (list): a list of DataFlow, or a list of (DataFlow, probability) tuples. Probabilities must sum to 1 if used.

(self, df_lists)

Source from the content-addressed store, hash-verified

424 """
425
426 def __init__(self, df_lists):
427 """
428 Args:
429 df_lists (list): a list of DataFlow, or a list of (DataFlow, probability) tuples.
430 Probabilities must sum to 1 if used.
431 """
432 super(RandomChooseData, self).__init__()
433 if isinstance(df_lists[0], (tuple, list)):
434 assert sum(v[1] for v in df_lists) == 1.0
435 self.df_lists = df_lists
436 else:
437 prob = 1.0 / len(df_lists)
438 self.df_lists = [(k, prob) for k in df_lists]
439
440 def reset_state(self):
441 super(RandomChooseData, self).reset_state()

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected