We perform a machine-learning-based network pruning that significantly reduces the complexity of routing and wavelength assignment in large optical networks. A significant computational time reduction is achieved by accepting a minor deterioration of the obtained solution