def __init__(self) -> None:
     size = img_size
     self.conv1 = convolution.Convolution(input_shape=(size, size, ci),
                                          out_channel=oc1,
                                          kernel_size=(ks1, ks1),
                                          stride=(stride1, stride1),
                                          learning_rate=conv1_learning_rate,
                                          activate_func='relu')
     assert (size - ks1) % stride1 == 0
     size = (size - ks1) // stride1 + 1
     self.pool1 = pooling.Pooling(input_shape=(size, size, oc1),
                                  pool_size=ps1)
     assert size % 2 == 0
     size //= 2
     self.conv2 = convolution.Convolution(input_shape=(size, size, oc1),
                                          out_channel=oc2,
                                          kernel_size=(ks2, ks2),
                                          stride=(stride2, stride2),
                                          learning_rate=conv2_learning_rate,
                                          activate_func='relu')
     assert (size - ks2) % stride2 == 0
     size = (size - ks2) // stride2 + 1
     self.pool2 = pooling.Pooling(input_shape=(size, size, oc2),
                                  pool_size=ps2)
     assert size % 2 == 0
     size //= 2
     self.conv3 = convolution.Convolution(input_shape=(size, size, oc2),
                                          out_channel=oc3,
                                          kernel_size=(ks3, ks3),
                                          stride=(stride3, stride3),
                                          learning_rate=conv3_learning_rate,
                                          activate_func='relu')
     assert (size - ks3) % stride3 == 0
     size = (size - ks3) // stride3 + 1
     self.pool3 = pooling.Pooling(input_shape=(size, size, oc3),
                                  pool_size=ps3)
     assert size % 2 == 0
     size //= 2
     self.conv4 = convolution.Convolution(input_shape=(size, size, oc3),
                                          out_channel=oc4,
                                          kernel_size=(ks4, ks4),
                                          stride=(stride4, stride4),
                                          learning_rate=conv4_learning_rate,
                                          activate_func='relu')
     assert (size - ks4) % stride4 == 0
     size4 = (size - ks4) // stride4 + 1
     self.fc1 = full_connection.FullConnection(
         dim_in=size * size * oc3,
         dim_out=deepid_dim // 2,
         learning_rate=fc1_learning_rate,
         activate_func='relu')
     self.fc2 = full_connection.FullConnection(
         dim_in=size4 * size4 * oc4,
         dim_out=deepid_dim // 2,
         learning_rate=fc2_learning_rate,
         activate_func='relu')
 def __init__(self) -> None:
     self.deepid1 = DeepID()
     self.deepid2 = DeepID()
     self.fc_cross = full_connection.FullConnection(
         dim_in=deepid_dim * 2,
         dim_out=cross_dim,
         learning_rate=fc_cross_learning_rate,
         activate_func='relu')
     self.fc_softmax = full_connection.FullConnection(
         dim_in=cross_dim,
         dim_out=2,
         learning_rate=fc_softmax_learning_rate,
         activate_func='softmax')
    def __init__(self) -> None:
        self.conv1 = convolution.Convolution((130, 130, 3),
                                             out_channel=96,
                                             kernel_size=(5, 5),
                                             stride=(1, 1),
                                             learning_rate=learning_rate,
                                             padding=(1, 1),
                                             activate_func='mfm')
        self.conv2a = convolution.Convolution((64, 64, 48),
                                              out_channel=96,
                                              kernel_size=(1, 1),
                                              stride=(1, 1),
                                              learning_rate=learning_rate,
                                              activate_func='mfm')
        self.conv2 = convolution.Convolution((64, 64, 48),
                                             out_channel=192,
                                             kernel_size=(3, 3),
                                             stride=(1, 1),
                                             learning_rate=learning_rate,
                                             padding=(1, 1),
                                             activate_func='mfm')
        self.conv3a = convolution.Convolution((32, 32, 96),
                                              out_channel=192,
                                              kernel_size=(1, 1),
                                              stride=(1, 1),
                                              learning_rate=learning_rate,
                                              activate_func='mfm')
        self.conv3 = convolution.Convolution((32, 32, 96),
                                             out_channel=384,
                                             kernel_size=(3, 3),
                                             stride=(1, 1),
                                             learning_rate=learning_rate,
                                             padding=(1, 1),
                                             activate_func='mfm')
        self.conv4a = convolution.Convolution((16, 16, 192),
                                              out_channel=384,
                                              kernel_size=(1, 1),
                                              stride=(1, 1),
                                              learning_rate=learning_rate,
                                              activate_func='mfm')
        self.conv4 = convolution.Convolution((16, 16, 192),
                                             out_channel=256,
                                             kernel_size=(3, 3),
                                             stride=(1, 1),
                                             learning_rate=learning_rate,
                                             padding=(1, 1),
                                             activate_func='mfm')
        self.conv5a = convolution.Convolution((16, 16, 128),
                                              out_channel=256,
                                              kernel_size=(1, 1),
                                              stride=(1, 1),
                                              learning_rate=learning_rate,
                                              activate_func='mfm')
        self.conv5 = convolution.Convolution((16, 16, 128),
                                             out_channel=256,
                                             kernel_size=(3, 3),
                                             stride=(1, 1),
                                             learning_rate=learning_rate,
                                             padding=(1, 1),
                                             activate_func='mfm')
        self.pool1 = pooling.Pooling((128, 128, 48), pool_size=2)
        self.pool2 = pooling.Pooling((64, 64, 96), pool_size=2)
        self.pool3 = pooling.Pooling((32, 32, 192), pool_size=2)
        self.pool4 = pooling.Pooling((16, 16, 128), pool_size=2)
        self.fc1 = full_connection.FullConnection(8 * 8 * 128,
                                                  512,
                                                  learning_rate=learning_rate,
                                                  activate_func='mfm')

        self.fc_out = full_connection.FullConnection(
            256, class_num, learning_rate=learning_rate)