1: \begin{abstract}
2: We show how to construct the deep neural network (DNN) expert to predict quasi-optimal $hp$-refinements for a given computational problem. The main idea is to train the DNN expert during executing the self-adaptive $hp$-finite element method ($hp$-FEM) algorithm and use it later to predict further $hp$ refinements.
3: For the training, we use a two-grid paradigm self-adaptive $hp$-FEM algorithm. It employs the fine mesh to provide the optimal $hp$ refinements for coarse mesh elements.
4: We aim to construct the DNN expert to identify quasi-optimal $hp$ refinements of the coarse mesh elements.
5: During the training phase, we use the direct solver to obtain the solution for the fine mesh to guide the optimal refinements over the coarse mesh element.
6: %We gather decisions about optimal $hp$ refinements of single finite elements to construct a dataset. After several iterations of the self-adaptive $hp$-FEM algorithm, we finish the deterministic algorithm. In practice, a reason for stopping the self-adaptive algorithm is that we are running out of resources and being computationally too intense to solve the fine mesh problem. At this point,
7: After training, we turn off the self-adaptive $hp$-FEM algorithm and continue with quasi-optimal refinements as proposed by the DNN expert trained. We test our method on three-dimensional Fichera and two-dimensional L-shaped domain problems. We verify the convergence of the numerical accuracy with respect to the mesh size. We show that the exponential convergence delivered by the self-adaptive $hp$-FEM can be preserved if we continue refinements with a properly trained DNN expert. Thus, in this paper, we show that from the self-adaptive $hp$-FEM it is possible to train the DNN expert the location of the singularities, and continue with the selection of the quasi-optimal $hp$ refinements, preserving the exponential convergence of the method.
8: \end{abstract}
9: