Density functional theory (DFT) is one of the primary approaches to get a solution to the manybody Schrodinger equation. The essential part of the DFT theory is the exchange-correlation (XC) functional, which can not be obtained in analytical form. Accordingly, the accuracy improvement of the DFT is mainly based on the development of XC functional approximations. Commonly, they are built upon analytic solutions in low-and high-density limits and result from quantum Monte Carlo or post-Hartree-Fock numerical calculations. However, there is no universal functional form to incorporate these data into XC functional. Various parameterizations use heuristic rules to build a specific XC functional. The neural network (NN) approach to interpolate the data from higher precision theories can give a unified path to parametrize an XC functional. Moreover, data from many existing quantum chemical databases could provide the XC functional with improved accuracy. In this work, we develop NN XC functional, which gives both exchange potential and exchange energy density. Proposed NN architecture consists of two parts NN-E and NN-V, which could be trained in separate ways, which adds additional flexibility. We also show the suitability of the developed NN XC functional in the self-consistent cycle when applied to atoms, molecules, and crystals.