def select_shape(input_shape, slice_point, axis=1):
    """ calculate the output shape of this layer using input shape

    Args:
        @input_shape (list of num): a list of number which represents the input shape
        @slice_point (list): parameter from caffe's Slice layer
        @axis (int): parameter from caffe's Slice layer

    Returns:
        @output_shape (list of num): a list of numbers represent the output shape
    """

    input_shape = list(input_shape)
    start = slice_point[0]
    if len(slice_point) == 2:
        end = slice_point[1]
    else:
        end = input_shape[axis]

    assert end > start, "invalid slice_point with [start:%d, end:%d]"\
             % (start, end)
    output_shape = input_shape
    output_shape[axis] = end - start
    return output_shape