def forward(self, inputs, device):
     x, gamma, beta = inputs
     y = functions.group_normalization(x,
                                       self.groups,
                                       gamma,
                                       beta,
                                       eps=self.eps)
     return y,
Example #2
0
def depthwise_normalization(x):
    x = chainer.as_variable(x)
    dim = x.shape[1]
    xp = x.xp
    dtype = x.dtype

    gamma = xp.ones(dim, dtype=dtype)
    beta = xp.zeros(dim, dtype=dtype)
    return F.group_normalization(x, dim, gamma, beta)
 def func(*args_):
     return functions.group_normalization(
         *[args_[0], self.groups, args_[1], args_[2]])
 def func(*args_):
     return functions.group_normalization(
         *[args_[0], self.groups, args_[1], args_[2]])
 def forward(self, inputs, device):
     x, gamma, beta = inputs
     y = functions.group_normalization(x, self.groups, gamma, beta,
                                       eps=self.eps)
     return y,