A new method for designing metasurfaces has been proposed and demonstrated, which allows for the generation of precise quantitative field distributions. This unique approach involves combining a tandem neural network with an iterative algorithm to optimize the metasurface design, enabling accurate control over the intensity and polarization of the resulting field. This strategy is both efficient and robust and has the potential to accelerate the development of metasurface devices with complex functionalities.