α-clustering structure is a significant topic in light nuclei. A Bayesian convolutional neural network (BCNN) is applied to classify initial non-clustered and clustered configurations, namely Woods-Saxon distribution and three-α triangular (four-α tetrahedral) structure for 12 C ( 16 O), from heavyion collision events generated within a multi-phase transport (AMPT) model. Azimuthal angle and transverse momentum distributions of charged pions are taken as inputs to train the classifier. On multiple-event basis, the overall classification accuracy can reach 95% for 12 C/ 16 O + 197 Au events at √ SNN = 200 GeV. With proper constructions of samples, the predicted deviations on mixed samples with different proportions of both configurations could be within 5%. In addition, setting a simple confidence threshold can further improve the predictions on the mixed dataset. Our results indicate promising and extensive possibilities of application of machine-learning-based techniques to real data and some other problems in physics of heavy-ion collisions.