In this paper, the authors approach the problem of boundary condition synthesis (also defined as field continuation) in a doubly connected domain by the use of a Neural Network-based approach. In this innovative method, given a field problem (magnetostatic, in the test case shown here), a set of Finite Element Method simulations is performed in order to define the training set (in terms of the potential over a domain) by solving the direct problem; subsequently, the Neural Network is trained to perform the boundary condition synthesis. The performances of different Neural Networks are compared, showing the accuracy and computational efficiency of the method. Moreover, domains externally bounded by two different kinds of polygonal contours (L-shaped and three-segments, respectively) are considered. As for the latter, the effect of the concavity/convexity of the boundary is deeply investigated. To sum up, a classical field continuation problem turns out to be revisited and solved with an innovative approach, based on deep learning.