ai:cntk
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| ai:cntk [2018/10/28 20:19] – [Windows] oga | ai:cntk [2018/11/03 22:29] (現在) – [keras と channels_last] oga | ||
|---|---|---|---|
| 行 9: | 行 9: | ||
| | Windows | | Windows | ||
| | Linux | < | | Linux | < | ||
| + | |||
| + | CNTK は TensorFlow 同様 Keras の backend として利用できます。 | ||
| + | |||
| + | CNTK 自体は channels_first ですが、Keras 上の互換性のために channels_last でも動作するように作られています。 | ||
| + | keras.json が channels_last の場合は内部で必要に応じて TransposeAxes が挿入されています。 | ||
| + | TransposeAxes の分だけ、パフォーマンス的には channels_first の方が速いようです。 | ||
| 行 14: | 行 20: | ||
| Binary SDK が用意されているので、source から build しなくても < | Binary SDK が用意されているので、source から build しなくても < | ||
| - | TensorFlow 同様 Keras の backend として利用できます。 | + | |
| 行 21: | 行 27: | ||
| - pip3 install cntk-gpu | - pip3 install cntk-gpu | ||
| - pip3 install keras | - pip3 install keras | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== keras と channels_last ===== | ||
| + | |||
| + | CNTK は channels_first の方が高速に実行できるようです。 | ||
| + | |||
| + | ^ keras image_data_format | ||
| + | | channles_first | ||
| + | | channels_last | ||
| + | |||
| + | |||
| + | channels_last の場合の例。 | ||
| + | ところどころ TransposeAxes が挿入されており、5 Layer 余計にかかっていることがわかります。 | ||
| + | |||
| + | |||
| + | < | ||
| + | Composite(conv2d_1_input: | ||
| + | Combine | ||
| + | Softmax | ||
| + | Plus | ||
| + | Times h (i: | ||
| + | Select | ||
| + | Constant | ||
| + | Dropout | ||
| + | ReLU | ||
| + | Plus | ||
| + | Times s (t: | ||
| + | Reshape | ||
| + | Select | ||
| + | Dropout | ||
| + | TransposeAxes | ||
| + | Pooling | ||
| + | TransposeAxes | ||
| + | ReLU | ||
| + | Plus | ||
| + | TransposeAxes | ||
| + | Convolution | ||
| + | TransposeAxes | ||
| + | Parameter | ||
| + | TransposeAxes | ||
| + | ReLU | ||
| + | Plus | ||
| + | TransposeAxes | ||
| + | Convolution | ||
| + | TransposeAxes | ||
| + | Parameter | ||
| + | TransposeAxes | ||
| + | Input conv2d_1_input Input4 | ||
| + | Reshape | ||
| + | Parameter | ||
| + | Reshape | ||
| + | Parameter | ||
| + | Parameter | ||
| + | Reshape | ||
| + | Parameter | ||
| + | Parameter | ||
| + | Reshape | ||
| + | Parameter | ||
| + | </ | ||
| + | |||
| + | channels_first の場合 | ||
| + | |||
| + | < | ||
| + | Composite(conv2d_1_input: | ||
| + | Combine | ||
| + | Softmax | ||
| + | Plus | ||
| + | Times h (i: | ||
| + | Select | ||
| + | Constant | ||
| + | Dropout | ||
| + | ReLU | ||
| + | Plus | ||
| + | Times s (t: | ||
| + | Reshape | ||
| + | TransposeAxes | ||
| + | Select | ||
| + | Dropout | ||
| + | Pooling | ||
| + | ReLU | ||
| + | Plus | ||
| + | Convolution | ||
| + | TransposeAxes | ||
| + | Parameter | ||
| + | ReLU | ||
| + | Plus | ||
| + | Convolution | ||
| + | TransposeAxes | ||
| + | Parameter | ||
| + | Input conv2d_1_input Input4 | ||
| + | Reshape | ||
| + | Parameter | ||
| + | Reshape | ||
| + | Parameter | ||
| + | Parameter | ||
| + | Reshape | ||
| + | Parameter | ||
| + | Parameter | ||
| + | Reshape | ||
| + | Parameter | ||
| + | </ | ||
| + | |||
ai/cntk.1540725585.txt.gz · 最終更新: by oga
