Data Consistency for Weakly Supervised Learning