young.y_y 2018-11-11 12:22 采纳率: 0%
浏览 1146
已结题

os.system(run_GPU+'一个py文件')这个run_gpu可以明显看出来是使用gpu,可这是什么用法

import os, sys
import ConfigParser

#config file to read from
config = ConfigParser.RawConfigParser()
config.readfp(open(r'./configuration.txt'))
#===========================================
#name of the experiment!!
name_experiment = config.get('experiment name', 'name')
nohup = config.getboolean('testing settings', 'nohup') #std output on log file?

#create a folder for the results if not existing already
result_dir = name_experiment
print "\n1. Create directory for the results (if not already existing)"
if os.path.exists(result_dir):
pass
elif sys.platform=='win32':
os.system('md ' + result_dir)
else:
os.system('mkdir -p ' + result_dir)

finally run the prediction

if nohup:
print "\n2. Run the prediction with nohup (no GPU)"
os.system(' nohup python -u ./src/retinaNN_predict.py > ' +'./'+name_experiment+'/'+name_experiment+'_prediction.nohup')
else:
print "\n2. Run the prediction without nohup (no GPU)"

os.system(run_GPU +' python ./src/retinaNN_predict.py')

作者:沈子恒
来源:CSDN
原文:https://blog.csdn.net/shenziheng1/article/details/80697467
版权声明:本文为博主原创文章,转载请附上博文链接!

  • 写回答

1条回答 默认 最新

  • devmiao 2018-11-11 15:50
    关注

    说明你有一个命令叫做run_gpu,具体看你的程序。

    评论

报告相同问题?

悬赏问题

  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型