Neural network defined and trained with pyTorch. Function approximated: def myFun(x1, x2): f = x1 * np.exp(-x1**2-x2**2) return f