convert to Caffe input image layout

def preprocess(net, image):
    '''
    convert to Caffe input image layout
    '''
    return np.float32(np.rollaxis(image, 2)[::-1]) - net.transformer.mean["data"]