Are there any side-effects of initing tf.compat.v1.Session with tensorflow 2?

I am using this code in Python with tensorflow=2.11 to set allow_growth = True:

            config = tf.compat.v1.ConfigProto()
            config.gpu_options.allow_growth = True
            session = tf.compat.v1.Session(config=config)

My question is if there are any other (side-)effects on the tensorflow behavior except for setting the memory allocation to be dynamic.

Hi @clime, Generally it is not preferable to use the compat.v1 module with 2.x as it might not guarantee to work as expected because the module was deprecated in 2.x. Thank You.

Thanks, though, I am not asking about anything “generally”. I am asking about concrete side effects of using that code with tensorflow 2 (or tensorflow 2.11 if that helps).