📜  tensorflow 使用不断增长的内存 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:10.657000             🧑  作者: Mango

代码示例1
import tensorflow as tf

physical_devices = tf.config.experimental.list_physical_devices('GPU')
config = tf.config.experimental.set_memory_growth(physical_devices[0], True)