(bottom, base_output=64, card=32)
return conv1, conv1_bn, conv1_scale, conv1_relu, conv2, conv2_bn, conv2_scale, conv2_relu, \
           conv3, conv3_bn, conv3_scale, eltwise, eltwise_relu
input:4*base_output x n x n
    output:4*base_output x n x n
    :param base_output: base num_output of branch2
    :param bottom: bottom layer
    :return: layers

    Args:
        card:
input:4*base_output x n x n
    output:4*base_output x n x n
    :param base_output: base num_output of branch2
    :param bottom: bottom layer
    :return: layers
input : 4 * base_output x n x n output : 4 * base_output x n x n : param base_output : base num_output of branch2 : param bottom : bottom layer : return : layers
def resnext_block(bottom, base_output=64, card=32):
    """
    input:4*base_output x n x n
    output:4*base_output x n x n
    :param base_output: base num_output of branch2
    :param bottom: bottom layer
    :return: layers

    Args:
        card:
    """
    conv1 = L.Convolution(bottom, num_output=base_output * (card / 16), kernel_size=1, stride=1, pad=0, bias_term=False,
                          param=[dict(lr_mult=1, decay_mult=1)], weight_filler=dict(type='xavier'))
    conv1_bn = L.BatchNorm(conv1, use_global_stats=False, in_place=True)
    conv1_scale = L.Scale(conv1, scale_param=dict(bias_term=True), in_place=True)
    conv1_relu = L.ReLU(conv1, in_place=True)

    conv2 = L.Convolution(conv1, num_output=base_output * (card / 16), kernel_size=3, stride=1, pad=1, group=card,
                          bias_term=False, param=[dict(lr_mult=1, decay_mult=1)], weight_filler=dict(type='xavier'))
    conv2_bn = L.BatchNorm(conv2, use_global_stats=False, in_place=True)
    conv2_scale = L.Scale(conv2, scale_param=dict(bias_term=True), in_place=True)
    conv2_relu = L.ReLU(conv2, in_place=True)

    conv3 = L.Convolution(conv2, num_output=base_output * 4, kernel_size=1, stride=1, pad=0, bias_term=False,
                          param=[dict(lr_mult=1, decay_mult=1)], weight_filler=dict(type='xavier'))
    conv3_bn = L.BatchNorm(conv3, use_global_stats=False, in_place=True)
    conv3_scale = L.Scale(conv3, scale_param=dict(bias_term=True), in_place=True)

    eltwise = L.Eltwise(bottom, conv3, eltwise_param=dict(operation=1))
    eltwise_relu = L.ReLU(eltwise, in_place=True)

    return conv1, conv1_bn, conv1_scale, conv1_relu, conv2, conv2_bn, conv2_scale, conv2_relu, \
           conv3, conv3_bn, conv3_scale, eltwise, eltwise_relu
def resnext_block ( bottom , base_output = 64 , card = 32 ) : conv1 = L . Convolution ( bottom , num_output = base_output * ( card / 16 ) , kernel_size = 1 , stride = 1 , pad = 0 , bias_term = False , param = [ dict ( lr_mult = 1 , decay_mult = 1 ) ] , weight_filler = dict ( type = 'xavier' ) ) conv1_bn = L . BatchNorm ( conv1 , use_global_stats = False , in_place = True ) conv1_scale = L . Scale ( conv1 , scale_param = dict ( bias_term = True ) , in_place = True ) conv1_relu = L . ReLU ( conv1 , in_place = True ) conv2 = L . Convolution ( conv1 , num_output = base_output * ( card / 16 ) , kernel_size = 3 , stride = 1 , pad = 1 , group = card , bias_term = False , param = [ dict ( lr_mult = 1 , decay_mult = 1 ) ] , weight_filler = dict ( type = 'xavier' ) ) conv2_bn = L . BatchNorm ( conv2 , use_global_stats = False , in_place = True ) conv2_scale = L . Scale ( conv2 , scale_param = dict ( bias_term = True ) , in_place = True ) conv2_relu = L . ReLU ( conv2 , in_place = True ) conv3 = L . Convolution ( conv2 , num_output = base_output * 4 , kernel_size = 1 , stride = 1 , pad = 0 , bias_term = False , param = [ dict ( lr_mult = 1 , decay_mult = 1 ) ] , weight_filler = dict ( type = 'xavier' ) ) conv3_bn = L . BatchNorm ( conv3 , use_global_stats = False , in_place = True ) conv3_scale = L . Scale ( conv3 , scale_param = dict ( bias_term = True ) , in_place = True ) eltwise = L . Eltwise ( bottom , conv3 , eltwise_param = dict ( operation = 1 ) ) eltwise_relu = L . ReLU ( eltwise , in_place = True ) return conv1 , conv1_bn , conv1_scale , conv1_relu , conv2 , conv2_bn , conv2_scale , conv2_relu , conv3 , conv3_bn , conv3_scale , eltwise , eltwise_relu