Baum-Eagon inequality in probabilistic labeling problems