【Tensorflow】Tensorflow 2.0 GPU的使用与分配

1、得到当前主机上特定运算设备的列表 gpus = tf.config.experimental.list_physical_devices(device_type='GPU') cpus = tf.config.experimental.list_physical_devices(device_type='CPU') print(gpus, cpus) 2、设置当前程序可见的设备范围 默认状况下
相关文章
相关标签/搜索