Implementing neural_net