Neural Networks Enhancement through Prior Logical Knowledge