質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Linux

Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Q&A

解決済

1回答

1446閲覧

digitsのネットワーク

matchdas3333

総合スコア12

Linux

Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

0グッド

0クリップ

投稿2017/09/20 01:52

DeepLearningについて勉強しています。

NVIDIAのDIGITSを用いて学習、テストをしようと試みているのですが、
ネットワーク構築の時点でエラーが出て学習に進むことができません。

  • 環境

OS:Ubuntu 16.04.2
CPU:Intel(R)Core(TM)i7-6850@3.60GHz
Memory:128GB
GPU:NVIDIA Quadro P6000(24GB)

DIGITSのバージョンは5.0.0
caffeは0.15.14です。

input: "data" input_shape{dim: 2 dim: 1 dim: 144 dim: 144 dim: 144} input: "label" input_shape{dim: 2 dim: 1 dim: 144 dim: 144 dim: 144} layer { name: "conv_in128_chan16" type: "Convolution" bottom: "data" top: "conv_in128_chan16" param { lr_mult: 1.0 decay_mult: 1.0 } param { lr_mult: 2.0 decay_mult: 0.0 } convolution_param { num_output: 16 kernel_size: 5 pad: 2 stride: 1 weight_filler { type: "msra" variance_norm: 2 } bias_filler { type: "constant" value: 0.0 } } } layer { name: "split1_1" type: "Split" bottom: "data" top: "t1_1" top: "t1_2" top: "t1_3" top: "t1_4" top: "t1_5" top: "t1_6" top: "t1_7" top: "t1_8" top: "t1_9" top: "t1_10" top: "t1_11" top: "t1_12" top: "t1_13" top: "t1_14" top: "t1_15" top: "t1_16" } layer { name: "concat1_1" bottom: "t1_1" bottom: "t1_2" bottom: "t1_3" bottom: "t1_4" bottom: "t1_5" bottom: "t1_6" bottom: "t1_7" bottom: "t1_8" bottom: "t1_9" bottom: "t1_10" bottom: "t1_11" bottom: "t1_12" bottom: "t1_13" bottom: "t1_14" bottom: "t1_15" bottom: "t1_16" top: "tiled1_1" type: "Concat" concat_param { axis: 1 } } layer { name: "addLayer1_1" type: "Eltwise" bottom: "conv_in128_chan16" bottom: "tiled1_1" top: "outBlock1_1" eltwise_param { operation: SUM } } layer { name: "outBlock1_1_RELU" type: "PReLU" bottom: "outBlock1_1" top: "outBlock1_1" } ##途中の畳み込み層などは割愛させていただきます。 layer { name: "reshapelab" type: "Reshape" bottom: "label" top: "label_flat" reshape_param { shape { dim: 0 # copy the dimension from below dim: 1 dim: 2985984 } } } layer { name: "reshaperes" type: "Reshape" bottom: "conv_in128_chan2_2_right" top: "conv_in128_chan2_right_flat" reshape_param { shape { dim: 0 # copy the dimension from below dim: 2 dim: 2985984 } } } layer { name: "softmax" type: "Softmax" bottom: "conv_in128_chan2_right_flat" top: "softmax_out" } layer { type: 'Python' name: 'loss' top: 'loss' bottom: 'softmax_out' bottom: "label_flat" python_param { # the module name -- usually the filename -- that needs to be in $PYTHONPATH module: 'pyLayer' # the layer name -- the class name in the module layer: 'DiceLoss' } # set loss weight so Caffe knows this is a loss layer. # since PythonLayer inherits directly from Layer, this isn't automatically # known to Caffe loss_weight: 1 }

エラー文は

Traceback (most recent call last):
File "digits/scheduler.py", line 508, in run_task
task.run(resources)
File "digits/task.py", line 188, in run
self.before_run()
File "digits/model/tasks/caffe_train.py", line 217, in before_run
self.save_files_generic()
File "digits/model/tasks/caffe_train.py", line 724, in save_files_generic
CaffeTrainTask.net_sanity_check(deploy_network, caffe_pb2.TEST)
File "digits/model/tasks/caffe_train.py", line 1635, in net_sanity_check
layer.name, bottom, "TRAIN" if phase == caffe_pb2.TRAIN else "TEST"))
CaffeTrainSanityCheckError: Layer 'reshapelab' references bottom 'label' at the TEST stage however this blob is not included at that stage. Please consider using an include directive to limit the scope of this layer.

です。

よろしくお願いいたします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

学習のためのデータに誤り(不整合)があるためです。 プログラムの問題ではありません。

エラーメッセージの内容は以下のようになっています(カッコ内は、私の和訳です)
CaffeTrainSanityCheckError(Caffeの学習 健全性検査エラー):
Layer 'reshapelab' references bottom 'label' at the TEST stage(reshapelab層は、TESTステージにおいてbottom 'label'を参照しています)
however this blob is not included at that stage(しかしながら、そのステージ(TESTステージ)においては、その(bottom 'label'の)データには読み込まれていません).
Please consider using an include directive to limit the scope of this layer(include命令を使って、この層のスコープを制限することをご検討ください).

投稿2017/09/20 06:41

coco_bauer

総合スコア6915

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

matchdas3333

2017/09/20 06:48

回答ありがとうございます。 いただいたアドバイスについて、 データのlayerの記述を変更し実行してみました。 layer { name: "data" type: "Data" top: "data" include { phase: TRAIN } data_param { batch_size: 1 backend: LMDB } } layer { name: "label" type: "Data" top: "label" include { phase: TRAIN } data_param { batch_size: 1 backend: LMDB } } layer { name: "data" type: "Data" top: "data" include { phase: TEST } data_param { batch_size: 1 backend: LMDB } } layer { name: "label" type: "Data" top: "label" include { phase: TEST } data_param { batch_size: 1 backend: LMDB } } このように記述しなおしたのですが、 同じエラーが出てしまいました。 includeとは、このような記述ではないのでしょうか? また、DIGITSでは、別の場所でデータセットの指定があるため記述はしていないのですが、 データセットの指定も必要なのでしょうか?
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問