Neural Network Application for Event Detection in Hybrid Dynamical Systems