Kicking Off Neural Network Training

Jahnvi s -

Welcome back to my blog! This week, I finally got to dive into the part I’ve been waiting for—building and training my neural networks! After all the data preprocessing and setup, it felt great to start working on the actual models. It is always more exciting to watch a network learn and improve over time, even if it includes lots of trial and error along the way.

To start off this week, I spent some time learning a bit more about neural networks. So, what is a neural network? I have created a basic diagram of a neural network below. As you can see, neural networks receive inputs in the input layer, process them through one or more hidden layers, and finally produce an output in the output layer—for example, a prediction probability. The forward propagation step calculates predictions by combining and transforming inputs at each layer. Those predictions are then compared to the true labels using a loss function. Based on the loss, an optimizer adjusts the network’s internal weights during backward propagation. Repeating these steps helps the model learn to produce more accurate predictions over time.

Training the Model

To create my neural network, I used ReLU and sigmoid activation functions. For optimization, I chose Adam, and for the loss function, I went with BCEWithLogitsLoss. I created a training loop to iterate over the specified number of epochs, where for each epoch, the data was processed in mini-batches using the DataLoader. For each batch, the model predicts the target variables, calculates the loss between predicted and actual values, performs backpropagation, and optimizes the model. At the end of each epoch, the loss value is printed to monitor training progress. I then used Grid Search to tune the hyperparameters to optimize performance.

This week was a big step forward, and next week, I am looking forward to evaluating how well the model performs on real data. I also plan on fine-tuning the architecture, integrating bootstrapping and bagging, experimenting with different parameters, and tackling other potential issues I may face. Stay tuned for more updates, and as always, feel free to drop any thoughts or questions in the comments!

More Posts

Comments:

All viewpoints are welcome but profane, threatening, disrespectful, or harassing comments will not be tolerated and are subject to moderation up to, and including, full deletion.

    tisya_o
    Hi Jahnvi! This sounds like an exciting step forward. Your diagram was especially helpful in explaining what a neural network is. How does the number of hidden layers affect your model's training? I cannot wait to see how your model develops!
    eesha_s
    It's great to hear that you started working on the models Jahnvi! Did you have a lot of options for the specific software that you chose to use? Why did you choose to use the software that you did for your neural network?
    jahnvi_s
    Hi Tisya! Thank you for your comment! The number of hidden layers affects how well the model captures complex patterns, with too few layers causing underfitting and too many leading to overfitting.
    jahnvi_s
    Hi Eesha! I mostly chose the software that I used based on research on prior neural networks that have been created, and because of what I had the most experience using in the past.

Leave a Reply

Your email address will not be published. Required fields are marked *