Solving the ODE

Finally, having set up the networks we are ready to use them to solve the ODE problem. We add the analytical solution

def g_analytic(x, gamma = 2, g0 = 10):
    return g0*np.exp(-gamma*x)