Open hechengdu opened 2 years ago
import tensorflow as tf import tensorflow.keras.backend as K
config = tf.ConfigProto() config.gpu_options.allow_growth=True sess = tf.Session(config=config) K.set_session(sess)
这段代码 tensorflow2.0要怎么改
tf.config.gpu.set_per_process_memory_growth(enabled=True)
import tensorflow as tf import tensorflow.keras.backend as K
config = tf.ConfigProto() config.gpu_options.allow_growth=True sess = tf.Session(config=config) K.set_session(sess)
这段代码 tensorflow2.0要怎么改