Machine Learning on Commodity Tiny Devices : Theory and Practice