Accurate and energy efficient ad-hoc neural network for wafer map classification | Synapse