Locating leakage plays a vital role in further improving the attack success rate and countermeasure in side-channel attacks. For template attacks based on convolutional neural network, it is difficult to locate the leakage due to the invisibility of the network. This paper proposed a new method named WAvg-Grad-CAM to locate the leakage spot of side-channel traces, based on the ideal of Gradient-weighted Class Activation Mapping(Grad-CAM). This method applies gradient mapping to compute the attacking effectiveness of different positions on the input trace. According to the attacking effectiveness, the leakage position of the input trace can be precisely located. The experiment shows that this new method has advantages of smooth result and lower noise, compared with other common visualization methods. The result shows that this attack method can be used to localize the masked implementations precisely, without leakages combination processing and without knowledge of the implemented protections, even on the condition of low successful rate.