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

Method reset_state

tensorpack/dataflow/imgaug/base.py:92–106  ·  view source on GitHub ↗

Reset rng and other state of the augmentor. Similar to :meth:`DataFlow.reset_state`, the caller of Augmentor is responsible for calling this method (once or more times) in the **process that uses the augmentor** before using it. If you use a built-in augmen

(self)

Source from the content-addressed store, hash-verified

90 setattr(self, k, v)
91
92 def reset_state(self):
93 """
94 Reset rng and other state of the augmentor.
95
96 Similar to :meth:`DataFlow.reset_state`, the caller of Augmentor
97 is responsible for calling this method (once or more times) in the **process that uses the augmentor**
98 before using it.
99
100 If you use a built-in augmentation dataflow (:class:`AugmentImageComponent`, etc),
101 this method will be called in the dataflow's own `reset_state` method.
102
103 If you use Python≥3.7 on Unix, this method will be automatically called after fork,
104 and you do not need to bother calling it.
105 """
106 self.rng = get_rng(self)
107
108 def _rand_range(self, low=1.0, high=None, size=None):
109 """

Callers 1

__init__Method · 0.95

Calls 1

get_rngFunction · 0.85

Tested by

no test coverage detected