Cpp code migration from TF1.x to TF2.x (Failed to run the session)

I’m using .pb model which was trained using tensorflow 1x and now have been shifted to orin nano which has latest libraries, python code conversion was successful but while migrating cpp code from 1.x to 2.x getting Failed to run Session error
how to load the graph using session in cpp code with tensorflow 2x