Lecture 9 neural network implementation