We propose a surrogate model for two-scale computational homogenization of elastostatics at finite strains. The macroscopic constitutive law is made numerically available via an explicit formulation of the associated macro-energy density. This energy density is constructed by using a neural network architecture that mimics a high-dimensional model representation. The database for training this network is assembled through solving a set of microscopic boundary values problems with the prescribed macroscopic deformation gradients (input data) and subsequently retrieving the corresponding averaged energies (output data). Therefore, the two-scale computational procedure for the nonlinear elasticity can be broken down into two solvers for microscopic and macroscopic equilibrium equations that work separately in two stages, called the offline and online stages. A standard finite element method is employed to solve the equilibrium equation at the macroscale. As for mircoscopic problems, an FFT-based collocation method is applied in tandem with the Newton-Raphson iteration and the conjugate-gradient method. Particularly, we solve the microscopic equilibrium equation in the Lippmann-Schwinger form without resorting to the reference medium and thus avoid the fixed-point iteration that might require quite strict numerical stability condition in the nonlinear regime.