Predicting the occurrence of rare and extreme events in complex systems is a fundamental problem in non-equilibrium physics. These events can have huge impacts on human societies. New approaches have emerged in recent years, which better estimate tail distributions. They often use large deviation concepts without the need to perform heavy direct ensemble simulations. In particular, a well-known approach is to derive a minimum action principle and find its minimizers.The analysis of rare reactive events in non-equilibrium systems without detailed balance is notoriously difficult both theoretically and computationally. They can often be described in the limit of small noise by the Freidlin-Wentzell action. Here, we propose a method which minimizes the geometric action instead using neural networks: it is called deep gMAM. It relies on a natural and simple machine-learning formulation of the classical gMAM approach when the Lagrangian is known. We provide a detailed description of the method as well as many examples: from bimodal switches in nonlinear stochastic (partial) differential equations, including a codimension-1 nucleation in an Allen-Cahn-Ginzburg-Landau 5-D stochastic partial differential equation, to quasi-potential estimates and extreme events in Burgers turbulence.