def __call__(self, x, test=False):
if test == True:
return x
xp = cuda.get_array_module(x.data)
ln_var = math.log(self.std ** 2)
noise = F.gaussian(Variable(xp.zeros_like(x.data)), Variable(xp.full_like(x.data, ln_var)))
return x + noise
评论列表
文章目录