Example of code for training a CNN to classify impulsive signals. The code for training, comprehensive of crossfold validation, is in the nn.py file.
Data can be found here.
Ertuncay D, De Lorenzo A, Costa G. Identification of Near-Fault Impulsive Signals and Their Initiation and Termination Positions with Convolutional Neural Networks. Geosciences. 2021; 11(9):388. https://doi.org/10.3390/geosciences11090388