Human activity recognition (HAR) is one of the most promising technologies in the smart home, especially radio frequency (RF-based) method, which has the advantages of low cost, few privacy concerns and wide coverage. In recent years, deep learning (DL) has been introduced into HAR and these DL-based HAR methods usually have outstanding performance. However, as the recognition scenarios and target change, the model performance drops sharply. To solve this problem, we propose a generalized method for cross-person activity recognition (CPAR), which is called snapshot ensemble learning based an attention with bidirectional long short-term memory (SE-ABLSTM). Specifically, by defining the cosine annealing learning rate, the models with diversity are saved and integrated in the same training process. In addition, we provide a dataset for CPAR and simulation results show that our method improves generalization performance by 5% compared to the original method. The source code and dataset for all the experiments can be available at https://github.com/NJUPT-Sivan/Cross-person-HAR.