R Keras是否基于此输出使用GPU? [英] Is R Keras using GPU based on this output?
问题描述
我已经在具有Tensorflow和gpu支持的R中安装了具有gpu支持的Keras.这是通过以下步骤安装的:
我可以得出结论,代码可以在GPU上运行吗?
还是上面图片中的这一行给出了错误: GPU库是静态链接的,请跳过dlopen检查.
在运行代码期间,GPU仅以3%的容量运行,而CPU以20-25%的容量运行.该代码的运行速度不比我最初在未安装GPU支持的情况下运行代码的速度快.
谢谢!
是的,tensorflow在启用GPU的情况下运行.Boston Housing是一个相对较小的数据集,可能无法从很大程度上使用GPU受益.下面的行表明它正在GPU上运行.创建了张量流设备(/job:localhost/副本:0/task:0device: GPU:0 ".
来自Tensorflow上的指南您可以设置 tf.debugging.set_log_device_placement(True)
以便明确查看每个操作的运行位置.R的等效项如下.
库(tensorflow)tf $ debugging $ set_log_device_placement(TRUE)
I have installed Keras with gpu support in R based on Tensorflow with gpu support. This is installed with these steps:
If I run the Bosting housing example code from the book Deep learning with R, I receive this screen:
Can I conclude that the code runs on the GPU?
Or is this line from the picture above giving an error:
GPU libraries are statically linked, skip dlopen check.
During running the code the GPU is running only on 3% of capacity while the CPU is running on 20-25%. The code is NOT running faster than while I initially did run the code without installing GPU support.
Thank you!
Yes, tensorflow is running with GPU enabled. Boston Housing is a relatively small dataset and probably does not benefit from using the GPU to a large degree. The lines below indicate it is running on the GPU. "Created tensorflow device (/job:localhost/replica:0/task:0device:GPU:0".
From the guide at Tensorflow
You can set tf.debugging.set_log_device_placement(True)
in order to explicitly see where each operation is running. THE R equivalent is below.
library(tensorflow)
tf$debugging$set_log_device_placement(TRUE)
这篇关于R Keras是否基于此输出使用GPU?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!