A Numerical Approach to Approximate Reasoning via a Symbolic Interface. Application to Image Classification