示例#1
0
    def __call__(self, x):
        outs = []

        if hasattr(self.f, 'conv1'):
            h1 = self.f.conv1(x)
            h1 = self.f.conv1n(h1)
            h1 = relu.relu(h1)
            outs.append(h1)

        h3 = relu.relu(self.f.proj3n(self.f.proj3(x)))
        h3 = relu.relu(self.f.conv3n(self.f.conv3(h3)))
        outs.append(h3)

        h33 = relu.relu(self.f.proj33n(self.f.proj33(x)))
        h33 = relu.relu(self.f.conv33an(self.f.conv33a(h33)))
        h33 = relu.relu(self.f.conv33bn(self.f.conv33b(h33)))
        outs.append(h33)

        p = self.f.pool(x)
        if hasattr(self.f, 'poolp'):
            p = relu.relu(self.f.poolpn(self.f.poolp(p)))
        outs.append(p)

        y = concat.concat(outs, axis=1)
        return y
示例#2
0
    def __call__(self, x):
        outs = []

        if hasattr(self.f, "conv1"):
            h1 = self.f.conv1(x)
            h1 = self.f.conv1n(h1)
            h1 = relu.relu(h1)
            outs.append(h1)

        h3 = relu.relu(self.f.proj3n(self.f.proj3(x)))
        h3 = relu.relu(self.f.conv3n(self.f.conv3(h3)))
        outs.append(h3)

        h33 = relu.relu(self.f.proj33n(self.f.proj33(x)))
        h33 = relu.relu(self.f.conv33an(self.f.conv33a(h33)))
        h33 = relu.relu(self.f.conv33bn(self.f.conv33b(h33)))
        outs.append(h33)

        p = self.f.pool(x)
        if hasattr(self.f, "poolp"):
            p = relu.relu(self.f.poolpn(self.f.poolp(p)))
        outs.append(p)

        y = concat.concat(outs, axis=1)
        return y
示例#3
0
    def __call__(self, x):
        outs = []

        if self.out1 > 0:
            h1 = self.f.conv1(x)
            h1 = self.f.conv1n(h1)
            h1 = relu.relu(h1)
            outs.append(h1)

        h3 = relu.relu(self.f.proj3n(self.f.proj3(x)))
        h3 = relu.relu(self.f.conv3n(self.f.conv3(h3)))
        outs.append(h3)

        h33 = relu.relu(self.f.proj33n(self.f.proj33(x)))
        h33 = relu.relu(self.f.conv33an(self.f.conv33a(h33)))
        h33 = relu.relu(self.f.conv33bn(self.f.conv33b(h33)))
        outs.append(h33)

        p = self.f.pool(x)
        if self.proj_pool is not None:
            p = relu.relu(self.f.poolpn(self.f.poolp(p)))
        outs.append(p)

        y = concat.concat(outs, axis=1)
        return y
示例#4
0
 def __call__(self, x):
     out1 = self.f.conv1(x)
     out3 = self.f.conv3(relu.relu(self.f.proj3(x)))
     out5 = self.f.conv5(relu.relu(self.f.proj5(x)))
     pool = self.f.projp(pooling_2d.max_pooling_2d(x, 3, stride=1, pad=1))
     y = relu.relu(concat.concat((out1, out3, out5, pool), axis=1))
     return y
示例#5
0
    def forward(self, x):
        f = self.f

        self.x = variable.Variable(x[0])
        outs = []

        if hasattr(f, 'conv1'):
            h1 = f.conv1(self.x)
            h1 = f.conv1n(h1)
            h1 = relu.relu(h1)
            outs.append(h1)

        h3 = relu.relu(f.proj3n(f.proj3(self.x)))
        h3 = relu.relu(f.conv3n(f.conv3(h3)))
        outs.append(h3)

        h33 = relu.relu(f.proj33n(f.proj33(self.x)))
        h33 = relu.relu(f.conv33an(f.conv33a(h33)))
        h33 = relu.relu(f.conv33bn(f.conv33b(h33)))
        outs.append(h33)

        p = f.pool(self.x)
        if hasattr(f, 'poolp'):
            p = relu.relu(f.poolpn(f.poolp(p)))
        outs.append(p)

        self.y = concat.concat(outs, axis=1)
        return self.y.data,
示例#6
0
 def __call__(self, x):
     out1 = self.f.conv1(x)
     out3 = self.f.conv3(relu.relu(self.f.proj3(x)))
     out5 = self.f.conv5(relu.relu(self.f.proj5(x)))
     pool = self.f.projp(pooling_2d.max_pooling_2d(
         x, 3, stride=1, pad=1))
     y = relu.relu(concat.concat((out1, out3, out5, pool), axis=1))
     return y
示例#7
0
    def forward(self, x):
        self.x = variable.Variable(x[0])
        out1 = self.f.conv1(self.x)
        out3 = self.f.conv3(relu.relu(self.f.proj3(self.x)))
        out5 = self.f.conv5(relu.relu(self.f.proj5(self.x)))
        pool = self.f.projp(
            pooling_2d.max_pooling_2d(self.x, 3, stride=1, pad=1))
        self.y = relu.relu(concat.concat((out1, out3, out5, pool), axis=1))

        return self.y.data,
示例#8
0
    def forward(self, x):
        self.x = variable.Variable(x[0])
        out1 = self.f.conv1(self.x)
        out3 = self.f.conv3(relu.relu(self.f.proj3(self.x)))
        out5 = self.f.conv5(relu.relu(self.f.proj5(self.x)))
        pool = self.f.projp(pooling_2d.max_pooling_2d(
            self.x, 3, stride=1, pad=1))
        self.y = relu.relu(concat.concat((out1, out3, out5, pool), axis=1))

        return self.y.data,