A deep learning platform optimized for implementation on FPGAs