2017-10-24 14 views
0

ためのエクスポート/インポートでエラー私は機械学習での初心者です。現在、私は私のmodel.ckptファイルを与えたモデルを訓練完了した次のリンクhttps://github.com/tensorflow/models/blob/master/object_detection/g3doc/exporting_models.mdオブジェクト検出:推論

に与えられたチュートリアルに従うことをしよう私は、エラーファイルをチェックすると、私は

{Your path}\tensor\flow\models\research> 
python object_detection\export_inference_graph.py\ 
--input_type=image_tensor \ 
--pipeline_config_path="{Your path}\model\ssd_mobilenet_v1_pets.config" \ 
--trained_checkpoint_prefix="{Your path}\models\train\" \ 
--output_directory=output_inference_graph.pb \ 
1>mloutput.txt 2>mlerror.txt 

ので、ウィンドウのコマンド・プロンプトに入力したコマンドは.belowで、これは私が見つけたものだった:

Traceback (most recent call last): 
    File "object_detection\export_inference_graph.py", line 106, in <module> 
    tf.app.run() 
    File "C:\Users\ericsen\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run 
    _sys.exit(main(_sys.argv[:1] + flags_passthrough)) 
    File "object_detection\export_inference_graph.py", line 95, in main 
    assert FLAGS.output_directory, '`output_directory` is missing' 
AssertionError: `output_directory` is missing 

なぜ出力ディレクトリが見つからないのか分かりません。それは純粋に私の間違いですか?それともバグですか?あなたの親切なフィードバックと助けが高く評価されます。私は印刷にすべての引数を試して見ていあなたに

答えて

0

ありがとう:

trained_checkpoint_prefixを= "{あなたのパス} \モデル\列車\" \ --output_directory = output_inference_graph.pb

その\ "\" で "{あなたのパス} \モデル\列車\"

追加して試してみてくださいが欠けているように見え、より "\" "電車\" の後に - > "電車\\"

{Your path}\tensor\flow\models\research> 
python object_detection\export_inference_graph.py\ 
--input_type=image_tensor \ 
--pipeline_config_path="{Your path}\model\ssd_mobilenet_v1_pets.config" \ 
--trained_checkpoint_prefix="{Your path}\models\train\\" \ 
--output_directory=output_inference_graph.pb \ 
+0

ああ、純粋に私のエラーでした。もう1つの "\"を追加した後、エラーログは、プログラムが訓練されたモデルを見つけることができなかったことを示しました。だから、私が最後にしたのは、 "\"の代わりにmodel.ckpt - ####を追加することでした。 JerryBさん、ありがとうございました。私は非常に感謝しています。 –