C-DNN and C-Transformer: Mixing ANNs and SNNs for the Best of Both Worlds