Resonance and synchronized rhythm are significant phenomena observed in dynamical systems in nature, particularly in biological contexts. These phenomena can either enhance or disrupt system functioning. Numerous examples illustrate the necessity for organs within the human body to maintain their rhythmic patterns for proper operation. For instance, in the brain, synchronized or desynchronized electrical activities can contribute to neurodegenerative conditions like Huntington's disease. In this paper, we utilize the well-established Hodgkin-Huxley (HH) model, which describes the propagation of action potentials in neurons through conductance-based mechanisms. Employing a "data-driven" approach alongside the outputs of the HH model, we introduce an innovative technique termed "dynamic entrainment." This technique leverages deep learning methodologies to dynamically sustain the system within its entrainment regime. Our findings show that the results of the dynamic entrainment technique match with the outputs of the mechanistic (HH) model.