The machine learning models are constructed to predict the fragment production cross sections in projectile fragmentation (PF) reactions using the Bayesian neural network (BNN) techniques. The massive learning for the BNN models is based on the 6393 fragments from 53 measured projectile fragmentation reactions. A direct BNN model and a physical guiding BNN by FRACS parametrization (BNN + FRACS) model have been constructed to predict the fragment cross section in projectile fragmentation reactions. It is verified that the BNN and BNN + FRACS models can well reproduce the wide range of fragment production in PF reactions with incident energy from 40 MeV/u to 1 GeV/u, reaction systems of projectile nucleus from $^{40}$Ar to $^{208}$Pb and various target nucleus. The high precision of the BNN and BNN + FRACS models makes them applicable in the low production rate of extreme rare isotopes in the future PF reactions with large asymmetry of projectile nucleus in the main new generation of radioactive nuclear beam factories.