We introduce an optimal sensor placement method using convolutional neural networks for ensemble-based data assimilation. The proposed method utilizes the gradient-weighted class activation mapping of the convolutional neural networks to identify important regions for assimilation processes. It is achieved by using the initial ensemble of samples for data assimilation as training data to construct a convolutional neural network-based surrogate model. In doing so, the method can estimate optimal sensor locations in an a priori manner, allowing for sensor placement before conducting data assimilation processing. Moreover, the gradient-weighted class activation mapping is used to alleviate the effect of error accumulation during the backpropagation process through global averaging. Further, these observation sensors are incorporated to reconstruct mean turbulent flow fields based on the ensemble Kalman method. The proposed optimal sensor placement method is applied to two flow applications with complex geometries, i.e., flows around periodic hills and an axisymmetric body of revolution. Both cases demonstrate that the proposed method can significantly reduce the number of sensors without sacrificing the accuracy of the reconstructed flow field.