I am getting an error module 'tensorflow' has no attribute 'get_default_graph' .Please help me to solve this. tensorflow : 2.4.0 VsCode python 3.6.9
enter code here
import tensorflow as tf
import numpy as np
n1 =tf.constant(1)
n2 = tf.constant(2)
n3 = n1+n2
with tf.compat.v1.Session() as sess:
result1 = sess.run(n3)
print(result1)
print(tf.get_default_graph())
g = tf.Graph()
print(g)