Fragments productions in spallation reactions are key infrastructure data for various applications. Based on the empirical parameterizations {sc spacs}, a Bayesian-neural-network (BNN) approach is established to predict the fragment cross sections in the proton induced spallation reactions. A systematic investigation have been performed for the measured proton induced spallation reactions of systems ranging from the intermediate to the heavy nuclei and the incident energy ranging from 168 MeV/u to 1500 MeV/u. By learning the residuals between the experimental measurements and the {sc spacs} predictions, the BNN predicted results are in good agreement with the measured results. The established method is suggested to benefit the related researches in the nuclear astrophysics, nuclear radioactive beam source, accelerator driven systems, and proton therapy, etc.