def imagenet_mean_preprocess_image_tensor_fun(x):
    """
    In:
        x - image tensor of size (#images, #channels, #dim1, #dim2)

    Out:
        image tensor x with subtracted imagenet mean
    """
    y = x 
    y[:,0,:,:] -= 103.939
    y[:,1,:,:] -= 116.779
    y[:,2,:,:] -= 123.68
    return y