In the previous article, we trained our model and checked the outputs, In this article we will take that analysis a step further by using TensorBoard
Launching TensorBoard
First, install TensorBoard if you haven't already.
pip install tensorboard
Then start TensorBoard by running:
tensorboard --logdir=lightning_logs/
We will be doing the analysis based on the lightning logs.
Once the command runs, TensorBoard will start a local server, usually available at http://localhost:6006.
Open it in your browser and navigate to the Scalars section.
Analyzing the Training Loss
Scroll down until you find the train_loss graph.
This graph plots:
- X-axis: Training steps
- Y-axis: Loss value
As training progresses, the loss steadily decreases toward zero.
Notice that the loss drops very quickly during the early stages of training. As the model improves, the rate of decrease slows down, since there is less error left to correct.
The loss still hasn't reached zero, which suggests that the model could benefit from additional training.
Analyzing Company A Predictions
Next, let's look at the out_0 graph.
This graph tracks the predictions for Company A throughout training.
Our target prediction for Company A is 0.
Initially, the prediction moves to higher values before gradually flattening out. Training for more epochs may help push the prediction closer to the desired value.
Analyzing Company B Predictions
Now let's examine the out_1 graph.
This graph shows how the predictions for Company B change during training.
Our target prediction for Company B is 1.
The prediction has started to level off around 0.5, which indicates that the model has not fully learned the desired output. Increasing the number of training epochs may help improve this prediction.
From these TensorBoard graphs, we can see that the model is learning, but it has not fully converged yet.
In the next article, we will increase the number of training epochs and see how the model's predictions improve.





Top comments (0)