Implementing a One-Layer Neural Network