def get_layer_input_shape_shape5(layer):
    """Convert a keras shape to an fdeep shape"""
    shape = layer.input_shape[1:]
    depth = len(shape)
    if depth == 1:
        return 1, 1, 1, 1, shape[0]
    if depth == 2:
        return 1, 1, 1, shape[0], shape[1]
    if depth == 3:
        return 1, 1, shape[0], shape[1], shape[2]
    if depth == 4:
        return 1, shape[0], shape[1], shape[2], shape[3]
    if depth == 5:
        return shape
    raise ValueError('invalid number of dimensions')
