Convert_variables_to_constants api throws error

Hi all, I am using this statement but it has thrown the following error

tf.compat.v1.graph_util.convert_variables_to_constants(sess, sess.graph.as_graph_def(), [output_names], variable_names_whitelist=None,

AssertionError Traceback (most recent call last)

Hi @Nagaraj_Trivedi, tf.compat.v1 is deprecated in 2.x versions. Please refer to this migration document to convert your code to the 2.x version. Thank You.