  This article is based on the tutorial we gave at the hands-on workshop of the
ICRANet-ISFAHAN Astronomy Meeting. We first introduce the basic theory of
machine learning and sort out the whole process of training a neural network.
We then demonstrate this process with an example of inferring redshifts from
SDSS spectra. To emphasize that machine learning for astronomy is easy to get
started, we demonstrate that the most basic CNN network can be used to obtain
high accuracy, we also show that with simple modifications, the network can be
converted for classification problems and also to processing gravitational wave
data.
