Quantitative analysis of T2 relaxation times could reveal molecular scale information, and has significance in the study of brain, spinal cord, articular cartilage, and cancer discrimination. However, it is non-trivial to recover the relaxation times from MR signals, especially as a continuous distribution, since it is an intrinsically ill-posed problem. In this work, ANNs have been trained to generate the T2 distribution spectra. The performance was evaluated across a large parameter range. In addition to superior computation speed, higher accuracy was achieved compared to the traditional method.