  We introduce a new nonparametric representation of the neutron star (NS)
equation of state (EoS) by using the variational autoencoder (VAE). As a deep
neural network, the VAE is frequently used for dimensionality reduction since
it can compress input data to a low-dimensional latent space using the encoder
component and then reconstruct the data using the decoder component. Once a VAE
is trained, one can take the decoder of the VAE as a generator. We employ
100,000 EoSs that are generated using the nonparametric representation method
based on \citet{2021ApJ...919...11H} as the training set and try different
settings of the neural network, then we get an EoS generator (trained VAE's
decoder) with four parameters. We use the mass\textendash{}tidal-deformability
data of binary neutron star (BNS) merger event GW170817, the
mass\textendash{}radius data of PSR J0030+0451, PSR J0740+6620, PSR J0437-4715,
and 4U 1702-429, and the nuclear constraints to perform the joint Bayesian
inference. The overall results of the analysis that includes all the
observations are $R_{1.4}=12.59^{+0.36}_{-0.42}\,\rm km$,
$\Lambda_{1.4}=489^{+114}_{-110}$, and $M_{\rm max}=2.20^{+0.37}_{-0.19}\,\rm
M_\odot$ ($90\%$ credible levels), where $R_{1.4}$/$\Lambda_{1.4}$ are the
radius/tidal-deformability of a canonical $1.4\,\rm M_\odot$ NS, and $M_{\rm
max}$ is the maximum mass of a non-rotating NS. The results indicate that the
implementation of the VAE techniques can obtain the reasonable results, while
accelerate calculation by a factor of $\sim$ 3\textendash10 or more, compared
with the original method.
