gpt4 book ai didi

python - Theano 无法使用 theano 配置 cnmem = 1 导入

转载 作者:太空宇宙 更新时间:2023-11-04 05:23:17 32 4
gpt4 key购买 nike

Theano导入失败,theano配置cnmem = 1

知道如何确保 GPU 完全分配给 theano python 脚本吗?

Note: Display is not used to avoid its GPU usage

文件:.theanorc

cnmem = 1

文件:test.py

print 'Importing Theano Library ...'
import theano
print 'Imported'

输出:

$ python test.py 
Importing Theano Library ...
Killed
$

它只适用于 cnmem = 0.75

文件:.theanorc

cnmem = 0.75

输出:

$ python test.py
Importing Theano Library ...
Imported
$

最佳答案

https://github.com/Theano/Theano/issues/4302#issuecomment-202067917

Could you try with 1.0 instead of 1? according to the docs, it needs to be a float. Also, it is limited to 0.95 to allow space for device drivers. So, you can't use the entire GPU memory just like you can't use all of RAM.

关于python - Theano 无法使用 theano 配置 cnmem = 1 导入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39599014/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com