Semantic Objective Functions: A distribution-aware method for adding logical constraints in deep learning