Parameter inference of ordinary differential equations from noisy data can be seen as a nonlinear regression problem, within a parametric setting. The use of a classical statistical method such as Nonlinear Least Squares (NLS) gives rise to difficult and heavy optimization problems due to the corresponding badly posed inverse problem. Gradient Matching algorithms use a smooth (nonparametric) estimation of the solution from which is derived a nonparametric estimate of the derivative, and gives rise to a natural criterion easier than NLS to optimize. We introduce here a new class of criteria based on a weak formulation of the ODE. The estimator derived can be viewed as a generalized moment estimators which possesses nice statistical and computational properties. Finally, we consider several examples which illustrate the efficiency and the versatility of the proposed method.