  Weak gravitational lensing is one of the most important probes of the nature
of dark matter and dark energy. In order to extract cosmological information
from next-generation weak lensing surveys (e.g., Euclid, Roman, LSST, and CSST)
as much as possible, accurate measurements of weak lensing shear are required.
There are existing algorithms to measure the weak lensing shear on imaging
data, which have been successfully applied in previous surveys. In the
meantime, machine learning (ML) has been widely recognized in various
astrophysics applications in modeling and observations. In this work, we
present a fully deep-learning-based approach to measuring weak lensing shear
accurately. Our approach comprises two modules. The first one contains a
convolutional neural network (CNN) with two branches for taking galaxy images
and point spread function (PSF) simultaneously, and the output of this module
includes the galaxy's magnitude, size, and shape. The second module includes a
multiple-layer neural network (NN) to calibrate weak-lensing shear
measurements. We name the program Forklens and make it publicly available
online. Applying Forklens to CSST-like mock images, we achieve consistent
accuracy with traditional approaches (such as moment-based measurement and
forward model fitting) on the sources with high signal-to-noise ratios (S/N, >
20). For the sources with S/N < 10, Forklens exhibits an $\sim 36\%$ higher
Pearson coefficient on galaxy ellipticity measurements. After adopting galaxy
weighting, the shear measurements with Forklens deliver accuracy levels to
$0.2\%$. The whole procedure of Forklens is automated and costs about $0.7$
milliseconds per galaxy, which is appropriate for adequately taking advantage
of the sky coverage and depth of the upcoming weak lensing surveys.
