get_session` is not available when using TensorFlow 2.0.
Answer: In TF 2.0 you should use tf.compat.v1.Session() instead of tf.Session() Use the following code to get rid of the error in Tensorflow2.0:
import tensorflow as tf
tf.compat.v1.Session()
i.e. in your code above, replace this line self.sess = tf.compat.v1.keras.backend.get_session()of code with
self.sess = tf.compat.v1.Session()
Reference:
https://github.com/tensorflow/tensorflow/issues/26844#issuecomment-474038678
Also in C:
- pthread_create
- how to ascii art in c
- es par
- table fixed header
- WARNING: QA Issue: rdepends on
- classification report to excel
- compile opencv program
- bcopy
- deallocate memory in c
- how to pass an array value to a pthread in c
- plt legend top right outside
- c allocate array
- if statement in c
- what is conio.h
- how to modulo decimal c
- functions in c
- curl post request
- C fscanf ignore commas
- how to globally initlailize a struct
- resto de division recursiva
- Search Code Snippets
- online python to c converter
- a enum data type in c with loop
- allocating memory for 1Mb text file in C