Distributed learning with IoT for quality control in manufacturing