You cannot exactly replicate the traditional NiN route because the Bergen Rail Line crosses the Hardangervidda to Myrdal where there is not a road for cars. If you rent a car and drive here is what you would miss:
For a taste of what the journey is like, watch this 10-minute NSB
video condensing footage from the entire seven-hour journey between
Oslo and Bergen. [Video link: https://youtu.be/Ql2qXpNVTjw ]
Here's a Lonely Planet description of the Bergen Line for railroad buffs:
Oslo to Bergen: Europe's best train journey?
We're somewhere on the Hardangervidda plateau, on one of the world's
highest stretches of railway tracks, and we appear to have stopped. I
say that with no great certainty because we're in the middle of a
Having just left Norway's most elevated train station, the Oslo to
Bergen train may or may not be continuing its astonishing progress
across a desperately inhospitable landscape. By the time we get here I
am simply in awe that this railway is here at all.