  We construct a catalogue of stellar masses and ages for 696,680 red giant
branch (RGB) stars, 180,436 primary red clump (RC) stars, and 120,907 secondary
RC stars selected from the LAMOST\,DR8. The RGBs, primary RCs, and secondary
RCs are identified with the large frequency spacing ($\Delta \nu$) and period
spacing ($\Delta P$), estimated from the LAMOST spectra with spectral SNRs $>
10$ by the neural network method supervised with the seismologic information
from LAMOST-Kepler sample stars. The purity and completeness of both RGB and RC
samples are better than 95\% and 90\%, respectively. The mass and age of RGBs
and RCs are determined again with the neural network method by taking the
LAMOST-Kepler giant stars as the training set. The typical uncertainties of
stellar mass and age are, respectively, 10\% and 30\% for the RGB stellar
sample. For RCs, the typical uncertainties of stellar mass and age are 9\% and
24\%, respectively. The RGB and RC stellar samples cover a large volume of the
Milky Way (5 $< R < 20$\,kpc and $|Z| <$\,5\,kpc), which are valuable data sets
for various Galactic studies.
