In cell-free multiple input multiple output (MIMO) networks, multiple base stations (BSs) can collaborate to achieve high spectral efficiency. Nevertheless, high penetration loss due to large blockages in harsh propagation environments is often an issue that severely degrades communication performance. Considering that intelligent reflecting surface (IRS) is capable of constructing digitally controllable reflection links in a low-cost manner, we investigate an IRS-enhanced downlink cell-free MIMO network in this paper. We aim to maximize the sum rate of all the users by jointly optimizing the transmit beamforming at the BSs and the reflection coefficients at the IRS. To address the optimization problem, we propose a fully distributed machine learning algorithm. Compared with the conventional iterative optimization algorithms that require a central processing at the central processing unit and large amount of channel state information and signaling exchange among the BSs, each BS can locally design its beamforming vector in the proposed algorithm. Meanwhile, the IRS reflection coefficients are determined by one of the BSs. Simulation results show that the deployment of IRS can significantly boost the sum user rate and that the proposed algorithm outperforms the benchmark methods.