The face recognition method based on deep convolutional neural network is difficult to deploy in the embedding devices. In this work, we optimize the MobileFaceNet face recognition network MobileFaceNet so as to deploy it in embedding environment. Firstly, we reduce the model parameters by reducing the number of layers in MobileFaceNet. Then, the h-ReLU6 activation function is used to replace PReLU in the original model. Finally, the effective channel attention module efficient channel attention is introduced to obtain the importance of each feature channel by learning. After the optimization, the MobileFaceNet parameters are compressed to 3.4 MB, which is smaller than the original model (4.9 MB), and the mAPs reach 98.52%, 97.54% and 91.33% on the test sets of LFW, VGGFace2 and the self-built database, respectively, and the recognition time is about 85 ms/photo. It shows that the proposed method achieves a good balance between the model complexity and model performance.