The absolute image reconstruction problem of electrical impedance tomography (EIT) is ill-posed. Traditional methods usually solve a nonlinear least squares problem with some kind of regularization. These methods suffer from low accuracy, poor anti-noise performance, and long computation time. Besides, the integration of a priori information is not very flexible. This work tries to solve EIT inverse problem using a machine learning algorithm for the application of thorax imaging. We developed the supervised descent learning EIT (SDL-EIT) inversion algorithm based on the idea of supervised descent method (SDM). The algorithm approximates the mapping from measured data to the conductivity image by a series of descent directions learned from training samples. We designed a training data set in which the thorax contour and some general structure of lungs and heart are embedded. The algorithm is implemented in both two- and three-dimensional cases, and is evaluated using synthetic and measured thoracic data. For synthetic data, SDL-EIT shows better accuracy and anti-noise performance compared with traditional Gauss Newton inversion (GNI) method. For measured data, the result of SDL-EIT is reasonable compared with computed tomography (CT) scan image. Using SDL-EIT, prior information can be easily integrated through the specifically designed training data set, and the image reconstruction process can be accelerated. The algorithm is effective in inverting measured thoracic data. It is a potential algorithm for human thorax imaging.