Tensorflow设置GPU训练模型

Tensorflow设置GPU训练模型

  • 添加以下代码

添加以下代码

import tensorflow as tf

gpus = tf.config.list_physical_devices("GPU")
if gpus:
    tf.config.experimental.set_memory_growth(gpus[0],True)

加油!

感谢!

努力!

你可能感兴趣的:(深度学习,tensorflow,深度学习,机器学习)