  It is of great interest to understand the equation of state (EOS) of the
neutron star (NS), whose core includes highly dense matter. However, there are
large uncertainties in the theoretical predictions for the EOS of NS. It is
useful to develop a new framework, which is flexible enough to consider the
systematic error in theoretical predictions and to use them as a best guess at
the same time. We employ a deep neural network to perform a non-parametric fit
of the EOS of NS using currently available data. In this framework, the
Gaussian process is applied to represent the EOSs and the training set data
required to close physical solutions. Our model is constructed under the
assumption that the true EOS of NS is a perturbation of the relativistic
mean-field model prediction. We fit the EOSs of NS using two different example
datasets, which can satisfy the latest constraints from the massive neutron
stars, NICER, and the gravitational wave of the binary neutron stars. Given our
assumptions, we find that a maximum neutron star mass is $2.38^{+0.15}_{-0.13}
M_\odot$ or $2.41^{+0.15}_{-0.14}$ at $95\%$ confidence level from two
different example datasets. It implies that the $1.4 M_\odot$ radius is
$12.31^{+0.29}_{-0.31}$ km or $12.30^{+0.35}_{-0.37}$ km. These results are
consistent with results from previous studies using similar priors. It has
demonstrated the recovery of the EOS of NS using a nonparametric model.
