2017-09-21 9 views
2

私はTensorflowについて学んでいます(私のチャットボットと統合したいと思います)、ここで見つかった例を実行したいと思いますが、それを実行するために管理can`tTENSORFLOWは、CPU上でのみ

私が提案し、リポジトリ、インストールtensorflowダウンロード(現在のCPUのみのバージョンを、だけでなく、--gpuを試してみました)が、これに捕まってしまった:私のシステムは何のCUDA GPU(良くし、持っていない

python ptb_word_lm.py --data_path=simple-examples/data/ --model=small --rnn_mode=basic 
2017-09-21 17:38:09.856638: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. 
2017-09-21 17:38:09.856685: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. 
Traceback (most recent call last): 
    File "ptb_word_lm.py", line 532, in <module> 
    tf.app.run() 
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run 
    _sys.exit(main(_sys.argv[:1] + flags_passthrough)) 
    File "ptb_word_lm.py", line 459, in main 
    % (len(gpus), FLAGS.num_gpus)) 
ValueError: Your machine has only 0 gpus which is less than the requested --num_gpus=1. 

CUDA 1.3、テンソルフローが必要とする> = 3ではなく)、tを得る方法彼は、単に終了するのではなく、CPU単モードで実行するサンプルコードですか?

答えて

5

gpusの番号をゼロの番号に設定しようとすると、ゼロになります。

python ptb_word_lm.py --data_path=simple-examples/data/ --model=small --rnn_mode=basic --num_gpus=0 

私は、エラーメッセージからこれを収集:あなただけあなたは、GPUを使用する場合、デフォルトは1であると仮定されるよう明示的にコマンドライン引数を設定する必要が0のGPUを持っているので

ValueError: Your machine has only 0 gpus which is less than the requested --num_gpus=1. 

パッケージ。

+0

Works !!! Tnks bro! – Caterpillaraoz

+1

エラーメッセージはとても役に立ちました;) –

関連する問題