Esempio n. 1
0
    def forward(self, x):
        self.ys = []
        for pooler in self.poolers:
            y = pooler.forward(x)[0]
            n, c, h, w = pooler.out_shape = y.shape
            self.ys.append(y.reshape((n, c * h * w, 1, 1)))

        return concat.Concat(axis=1).forward(self.ys)
Esempio n. 2
0
    def forward(self, x):
        self.ys = []
        for pooler in self.poolers:
            y_var = pooler(*x)
            n, c, h, w = pooler.out_shape = y_var.shape
            self.ys.append(y_var.reshape((n, c * h * w, 1, 1)))

        return concat.Concat(axis=1).forward([y.data for y in self.ys])