Machine learning methods are progressively investigated for a large amount of applications. Recently, the solution of partial differential equations (PDE) describing problems in elastostatics came into focus. The current work investigates two neural network-based classes of methods for their solution, namely the neural finite element method (FEM) and neural operator methods. The analysis of these approaches is carried out by means of numerical experiments with linear and nonlinear material behavior where the conventional FEM serves as a benchmark. The formulation of neural FEM allows for elegant integration of finite deformation hyperelasticity at medium training effort. Here, training data are replaced by the evaluation of the equilibrium PDE at sample points. In contrast, most neural operator methods require expensive training with large data sets, but then allow for solving multiple boundary value problems with the same machine learning model. For the comparative analysis, the maximal relative error values over the whole domain and over all components of the strain tensor are evaluated as accuracy measure. The current state of research shows that none of the methods investigated reaches the accuracy and computational performance of the conventional FEM. In many standard applications, the FEM achieves an accuracy of $$10^{-6}$$
10
-
6
, whereas the numerical tests in the present work report a relative error of order of magnitude of $$10^{-4}$$
10
-
4
for the neural FEM and $$10^{-2}$$
10
-
2
to $$10^{-3}$$
10
-
3
for neural operator methods.