complete basic implementation codes for deep learning