(bottom, stride=2, base_output=64)
return branch1, branch1_bn, branch1_scale, branch2a, branch2a_bn, branch2a_scale, branch2a_relu, branch2b, \
           branch2b_bn, branch2b_scale, branch2b_relu, branch2c, branch2c_bn, branch2c_scale, residual, residual_relu
:param stride: stride
    :param base_output: base num_output of branch2
    :param bottom: bottom layer
    :return: layers
def residual_branch_shortcut(bottom, stride=2, base_output=64):
    """

    :param stride: stride
    :param base_output: base num_output of branch2
    :param bottom: bottom layer
    :return: layers
    """
    branch1, branch1_bn, branch1_scale = \
        conv_bn_scale(bottom, num_output=4 * base_output, kernel_size=1, stride=stride)

    branch2a, branch2a_bn, branch2a_scale, branch2a_relu = \
        conv_bn_scale_relu(bottom, num_output=base_output, kernel_size=1, stride=stride)
    branch2b, branch2b_bn, branch2b_scale, branch2b_relu = \
        conv_bn_scale_relu(branch2a, num_output=base_output, kernel_size=3, pad=1)
    branch2c, branch2c_bn, branch2c_scale = \
        conv_bn_scale(branch2b, num_output=4 * base_output, kernel_size=1)

    residual, residual_relu = \
        eltwize_relu(branch1, branch2c)  # 4*base_output x n x n

    return branch1, branch1_bn, branch1_scale, branch2a, branch2a_bn, branch2a_scale, branch2a_relu, branch2b, \
           branch2b_bn, branch2b_scale, branch2b_relu, branch2c, branch2c_bn, branch2c_scale, residual, residual_relu
def residual_branch_shortcut ( bottom , stride = 2 , base_output = 64 ) : branch1 , branch1_bn , branch1_scale = conv_bn_scale ( bottom , num_output = 4 * base_output , kernel_size = 1 , stride = stride ) branch2a , branch2a_bn , branch2a_scale , branch2a_relu = conv_bn_scale_relu ( bottom , num_output = base_output , kernel_size = 1 , stride = stride ) branch2b , branch2b_bn , branch2b_scale , branch2b_relu = conv_bn_scale_relu ( branch2a , num_output = base_output , kernel_size = 3 , pad = 1 ) branch2c , branch2c_bn , branch2c_scale = conv_bn_scale ( branch2b , num_output = 4 * base_output , kernel_size = 1 ) residual , residual_relu = eltwize_relu ( branch1 , branch2c ) # 4*base_output x n x n return branch1 , branch1_bn , branch1_scale , branch2a , branch2a_bn , branch2a_scale , branch2a_relu , branch2b , branch2b_bn , branch2b_scale , branch2b_relu , branch2c , branch2c_bn , branch2c_scale , residual , residual_relu