We propose a machine learning method to characterize photonic states via a simple optical circuit and the data processing of photon number distributions as photonic patterns. The input states consist of two coherent states used as references and a two-mode unknown state to be studied. We successfully trained a supervised learning algorithm to predict the degree of entanglement in the two-mode state and to perform the full tomography of one photonic mode, obtaining good accuracy and an $r$-factor performance of our algorithm $r > 0.75$.