  We present cosmological constraints from the Subaru Hyper Suprime-Cam (HSC)
first-year weak lensing shear catalogue using convolutional neural networks
(CNNs) and conventional summary statistics. We crop 19
$3\times3\,\mathrm{{deg}^2}$ sub-fields from the first-year area, divide the
galaxies with redshift $0.3\le z\le1.5$ into four equally-spaced redshift bins,
and perform tomographic analyses. We develop a pipeline to generate simulated
convergence maps from cosmological $N$-body simulations, where we account for
effects such as intrinsic alignments (IAs), baryons, photometric redshift
errors, and point spread function errors, to match characteristics of the real
catalogue. We train CNNs that can predict the underlying parameters from the
simulated maps, and we use them to construct likelihood functions for Bayesian
analyses. In the $\Lambda$ cold dark matter model with two free cosmological
parameters $\Omega_\mathrm{m}$ and $\sigma_8$, we find
$\Omega_\mathrm{m}=0.278_{-0.035}^{+0.037}$,
$S_8\equiv(\Omega_\mathrm{m}/0.3)^{0.5}\sigma_8=0.793_{-0.018}^{+0.017}$, and
the IA amplitude $A_\mathrm{IA}=0.20_{-0.58}^{+0.55}$. In a model with four
additional free baryonic parameters, we find
$\Omega_\mathrm{m}=0.268_{-0.036}^{+0.040}$, $S_8=0.819_{-0.024}^{+0.034}$, and
$A_\mathrm{IA}=-0.16_{-0.58}^{+0.59}$, with the baryonic parameters not being
well-constrained. We also find that statistical uncertainties of the parameters
by the CNNs are smaller than those from the power spectrum (5--24 percent
smaller for $S_8$ and a factor of 2.5--3.0 smaller for $\Omega_\mathrm{m}$),
showing the effectiveness of CNNs for uncovering additional cosmological
information from the HSC data. With baryons, the $S_8$ discrepancy between HSC
first-year data and Planck 2018 is reduced from $\sim2.2\,\sigma$ to
$0.3\text{--}0.5\,\sigma$.
