Algorithm Optimization And Hardware Acceleration For Machine Learning Applications On Low-Energy Systems