## 3 Results  
In the numerical experiments, we defined a non-convex domain \(\Omega\) with sharp corners to demonstrate that the method also works for non-trivial geometries. This is shown in Figure 1 together with the points and outward normal vectors, which were used in the computations:  
* \(\{\mathbf{z}_{j}\}_{j=1}^{N}\subset\partial\Omega\): red stars on the boundary, where Dirichlet boundary conditions are given:
* \(\mathbf{z}_{j}^{*}=\mathbf{z}_{j}\): we approximated the Neumann boundary data in the same points;
* \(\{\mathbf{v}(\mathbf{z}_{j})\}_{j=1}^{N}\): red-green-blue outward normal vectors at the boundary;
* \(\{\mathbf{y}_{j}\}_{j=1}^{K}\subset\mathbb{R}\setminus\overline{\Omega}\): blue points (quite densely;. * Here, according to the numerical experiments, \(N=M=89\) and \(K=10,125\). We dealt only with Problem 2, but within the second approach, we have to compute pointwise values in (4), which is the issue of Problem 1. Problem 2, first approach: Using \(z_{j}=z_{j}^{*}\) with \(N=M=89\) means that the input and the output layers both have a size of 89. Assuming a dense connection between them without any intermediate layers and bias terms, we have \(89\cdot 89=7921\) as the number of parameters. In this way, we really need a number of learning data for a reliable fit. This suggests trying \(K=10,125\) as an optimistic guess. The forthcoming figures all correspond to this case. For an experimental error analysis, in the next subsection, we perform a series of further experiments using a variety of parameters. We summarize the common setup of the corresponding computations as follows:  
* Full-rank approach: one input and one output layer of size \(N=M\);
* Low-rank approach: one extra intermediate layer of size 15-25% of \(N\);
* Connectivity: dense, no bias term;
* Activation: linear;
* Loss function: mean-squared error;
* Optimizer: ADAM (see [16]), learning rate: 0.001, batch size: 32. The learning performance of the neural network is shown in Figure 2. The above setup with all of the parameters was the result of a series of experiments. To reduce the computational costs, we have more options. For this, in any case, we should reduce the number of parameters in the neural network. The simplest option is to apply an additional dropout procedure. This, however, really harms the accuracy of the approximation. We can guess this: for solving the Dirichlet-to-Neumann problems, we need dense matrices, where we cannot just change some elements to be zero. Instead, a more sophisticated strategy is to try to use more sparse layers instead of the original one dense layer. As a realistic choice, one could use, e.g., some locally connected ones. At the matrix level, this means that the original dense matrix can be well approximated with the product of some sparse ones. To mimic this, we incorporated 1, 2, 3, 4, and 5 locally connected hidden layers with kernel sizes 3, 4, and 5. This strategy, however, still did not lead to a better performance: one try is shown in Figure 3.  
Figure 1: The computational domain with the boundary points (red stars), the corresponding outward normals, and the outer points (blue line). Therefore, in the forthcoming simulations, we use a densely connected input-output layer pair. At the end, we return back to this problem and try another strategy to reduce the number of parameters. In the course of the second approach, using \(z_{j}=z_{j}^{*}\ (j=1,2,\ldots,N=M)\), we have to predict only the point values \(u(z_{j}-s\cdot\boldsymbol{v})\ (j=1,2,\ldots,N)\) according to the third point of our algorithm. We used the same setup as given above with \(s=0.15\), and the corresponding learning performance is depicted in Figure 4. This prediction is quite accurate, as suggested by the low loss value here. To test the performance of the prediction, we took a model problem with the analytic solution \(u:\Omega\rightarrow\mathbb{R},\ u(x,y)=(x-1)^{2}-(y+3)^{2}\). The trained neural network was applied for the boundary values of this function.