def slicable(dim, pad=0):
    dim0 = reduce(mul, dim[:-1], 1) + pad
    return (dim0, dim[-1])
colapse outer dimensions into one and preserve inner dimension
dataset/ETHPy150Open NervanaSystems/neon/neon/backends/tests/test_backend_conv_layer.py/slicable