You got above error because tensorflow.contrib has been removed from the packages.
Since all the projects in tf.contrib were not officially supported by Tensorflow and it had designated owners for maintaining it.
From Tensorflow 2.x version all the contrib projects has three options: move to core, move to a separate repository or delete most of of them have been reviewed with the respective project owners.
If the library you are using is moved to the core or separate repository, then tensorflow automatic code migration from 1.x
to 2.x
will not work for tf.contrib` projects. You have to change code manually for above parts, which is suggested going forward.
You can refer this article for Pose Estimation using TensorFlow 2.0.