From Linear Regression to Neural Networks: Transitioning from NumPy to PyTorch