Added implementation for neural net.