Skip to content

bug: Equalized Deconv layer #9

@nashory

Description

@nashory

I figure self.inv_c = np.sqrt(2.0/(in_ch)) should be self.inv_c = np.sqrt(2.0/(in_ch*ksize**2)) like EqualizedConv2d layer. What do you think? :0

original code:

class EqualizedDeconv2d(chainer.Chain):
    def __init__(self, in_ch, out_ch, ksize, stride, pad):
        w = chainer.initializers.Normal(1.0) # equalized learning rate
        self.inv_c = np.sqrt(2.0/(in_ch))
        super(EqualizedDeconv2d, self).__init__()
        with self.init_scope():
            self.c = L.Deconvolution2D(in_ch, out_ch, ksize, stride, pad, initialW=w)
    def __call__(self, x):
        return self.c(self.inv_c * x)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions