Joint Memory Frequency and Computing Frequency Scaling for Energy-efficient DNN Inference