Weakly-supervised Dictionary Learning