It seems like you are following the tutorial from tutsplus “Slider to Your WordPress Theme”
Coding looks correct but as @cybmeta already mentioned in the comment you need to set Featured Image for each slide to display in the slider properly.
Details for Featured Image here also