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

Method __init__

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

Source from the content-addressed store, hash-verified

559 """
560
561 def __init__(self, beta, seed=None):
562 assert seed is None or isinstance(seed, int)
563 super(Mixup, self).__init__()
564 self.beta_func = RNG(seed).beta
565 self.beta = beta
566
567 def sample(self, batch):
568 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