  Context. The Javalambre Photometric Local Universe Survey (J-PLUS) has
obtained precise photometry in twelve specially designed filters for large
numbers of Galactic stars. Deriving their precise stellar atmospheric
parameters and individual elemental abundances is crucial for studies of
Galactic structure, and the assembly history and chemical evolution of our
Galaxy. Aims. Our goal is to estimate not only stellar parameters (effective
temperature, Teff, surface gravity, log g, and metallicity, [Fe/H]), but also
[{\alpha}/Fe] and four elemental abundances ([C/Fe], [N/Fe], [Mg/Fe], and
[Ca/Fe]) using data from J-PLUS DR1. Methods. By combining recalibrated
photometric data from J-PLUS DR1, Gaia DR2, and spectroscopic labels from
LAMOST, we design and train a set of cost-sensitive neural networks, the CSNet,
to learn the non-linear mapping from stellar colors to their labels. Results.
We have achieved precisions of {\delta}Teff {\sim}55K,
{\delta}logg{\sim}0.15dex, and {\delta}[Fe/H]{\sim}0.07dex, respectively, over
a wide range of temperature, surface gravity, and metallicity. The
uncertainties of the abundance estimates for [{\alpha}/Fe] and the four
individual elements are in the range 0.04-0.08 dex. We compare our parameter
and abundance estimates with those from other spectroscopic catalogs such as
APOGEE and GALAH, and find an overall good agreement. Conclusions. Our results
demonstrate the potential of well-designed, high-quality photometric data for
determinations of stellar parameters as well as individual elemental
abundances. Applying the method to J-PLUS DR1, we have obtained the
aforementioned parameters for about two million stars, providing an outstanding
data set for chemo-dynamic analyses of the Milky Way. The catalog of the
estimated parameters is publicly accessible.
