MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / __init__

Method __init__

imperative/python/megengine/module/vision.py:629–635  ·  view source on GitHub ↗
(self, beta, seed=None)

Source from the content-addressed store, hash-verified

627 """
628
629 def __init__(self, beta, seed=None):
630 assert seed is None or isinstance(seed, int)
631 super(Cutmix, self).__init__()
632 self.beta_func = RNG(seed).beta
633 self.uniform_func = RNG(seed).uniform
634 self.beta = beta
635 self.custom_func = custom.cutmix_forward()
636
637 def sample(self, batch):
638 return self.beta_func(self.beta, self.beta, size=(batch,))

Callers

nothing calls this directly

Calls 2

RNGClass · 0.50
__init__Method · 0.45

Tested by

no test coverage detected