def nnf_shape(A,B,patch_size):
    """
        compute nnf shape as (A.w,A.h) - patch_size//2*2
    """
    h,w = A.shape[0:2]
    h_nnf = h-patch_size//2*2
    w_nnf = w-patch_size//2*2
    return (h_nnf,w_nnf,3)