Esempio n. 1
0
    def __call__(self, x, wr=0.0):
        #h_m = FX.wsa(self.conv1(x), wr=wr)
        #h_s  = x[:, :, 1:-1, 1:-1]
        h = FX.wsa(self.conv1s(x), wr=wr)
        #h = F.hstack((h_m, h_s))
        h = F.max_pooling_2d(h, 4, stride=2)

        h_m = FX.wsa(self.conv2(h), wr=wr)
        h_s = FX.wsa(self.conv2s(h), wr=wr)
        h = F.hstack((h_m, h_s))
        h = F.max_pooling_2d(h, 4, stride=2)

        return h
Esempio n. 2
0
    def __call__(self, x, wr=0.0):
        h_xl = FX.wsa(self.conv1xl(x), wr=wr)
        h_l = FX.wsa(self.conv1(x), wr=wr)
        h_m = x[:, :, 1:-1, 1:-1]
        h_m = FX.wsa(self.conv1m(h_m), wr=wr)
        h_s = x[:, :, 2:-2, 2:-2]
        h_s = FX.wsa(self.conv1s(h_s), wr=wr)
        h_xs = x[:, :, 3:-3, 3:-3]
        h_xs = FX.wsa(self.conv1xs(h_xs), wr=wr)
        h = F.hstack((h_xl, h_l, h_m, h_s, h_xs))
        h = F.max_pooling_2d(h, 3, stride=2)

        h_m = FX.wsa(self.conv2(h), wr=wr)
        h_s = FX.wsa(self.conv2s(h), wr=wr)
        h = F.hstack((h_m, h_s))
        h = F.max_pooling_2d(h, 3, stride=2)

        h_m = self.conv3(h)
        h_s = self.conv3s(h)
        h = F.hstack((h_m, h_s))
        h = F.max_pooling_2d(h, 3, stride=2)
        return h