示例#1
0
    def __init__(self, block, unpooling_cls):
        super(InvCeption2, self).__init__(block, unpooling_cls)

        with self.init_scope():
            self.deconv3x3 = DeConv2D_BN(block.conv3x3)
            self._out1 = block.conv3x3.conv.W.shape[0]

            self.deconv3x3_1 = DeConv2D_BN(block.conv3x3_1)
            self.deconv3x3_2 = DeConv2D_BN(block.conv3x3_2)
            self.deconv3x3_3 = DeConv2D_BN(block.conv3x3_3)
            self._out2 = block.conv3x3_3.conv.W.shape[0]
示例#2
0
    def __init__(self, head):
        super(InvCeptionHead, self).__init__()

        with self.init_scope():
            self.deconv1 = DeConv2D_BN(head.conv1)
            self.deconv2 = DeConv2D_BN(head.conv2)
            self.deconv3 = DeConv2D_BN(head.conv3)
            self.unpooling4 = MaxUnPooling2D(head.pool4)

            self.deconv5 = DeConv2D_BN(head.conv5)
            self.deconv6 = DeConv2D_BN(head.conv6)
            self.unpooling7 = MaxUnPooling2D(head.pool7)
示例#3
0
    def __init__(self, block, unpooling_cls):
        super(BaseBlock, self).__init__()

        with self.init_scope():
            if hasattr(block, "pool_conv"):
                self.pool_deconv = DeConv2D_BN(block.pool_conv)

        self.unpool = unpooling_cls(block.pool)
示例#4
0
	def test_conv_bn(self):
		conv_bn = self._new_conv_bn(F.identity)
		deconv_bn_grad = DeConv2D_BN(conv_bn)

		y = self._call_and_backprop(conv_bn)

		res = deconv_bn_grad(y.grad)
		self.assertGradCloseTo(res.array)
示例#5
0
    def __init__(self, block, unpooling_cls):
        super(InvCeption3, self).__init__(block, unpooling_cls)

        with self.init_scope():

            self.deconv1x1 = DeConv2D_BN(block.conv1x1)
            self._out1 = block.conv1x1.conv.W.shape[0]

            self.deconv7x7_1 = DeConv2D_BN(block.conv7x7_1)
            self.deconv7x7_2 = DeConv2D_BN(block.conv7x7_2)
            self.deconv7x7_3 = DeConv2D_BN(block.conv7x7_3)
            self._out2 = block.conv7x7_3.conv.W.shape[0]

            self.deconv7x7x2_1 = DeConv2D_BN(block.conv7x7x2_1)
            self.deconv7x7x2_2 = DeConv2D_BN(block.conv7x7x2_2)
            self.deconv7x7x2_3 = DeConv2D_BN(block.conv7x7x2_3)
            self.deconv7x7x2_4 = DeConv2D_BN(block.conv7x7x2_4)
            self.deconv7x7x2_5 = DeConv2D_BN(block.conv7x7x2_5)
            self._out3 = block.conv7x7x2_5.conv.W.shape[0]