Algorithm-Accelerator Co-Design for Neural Network Specialization