A machine learning approach to fracture mechanics problems