Identifying knot types of polymer conformations by machine learning