第13章計算の性能
13.1.2. Hybrid Programming13.1.2 ハイブリッド・プログラミング
Historically most deep learning frameworks choose between an imperative or a symbolic approach. For example, Theano, TensorFlow (inspired by the former), Keras, and CNTK formulate models symbolically. Conversely, Chainer and PyTorch take an imperative approach. An imperative mode was added to TensorFlow 2.0 and Keras in later revisions.
英語のヒント
歴史的に、ほとんどの深層学習のフレームワークは、命令型か記号的なやり方のどちらかを選ぶ。たとえば、Theano、TensorFlow(前者に着想を得た)、Keras、CNTKは、モデルを記号的に定式化する。逆に、ChainerとPyTorchは命令型のやり方をとる。命令型のモードは、後の改訂でTensorFlow 2.0とKerasに加えられた。
As mentioned above, PyTorch is based on imperative programming and uses dynamic computation graphs. In an effort to leverage the portability and efficiency of symbolic programming, developers considered whether it would be possible to combine the benefits of both programming paradigms. This led to a torchscript that lets users develop and debug using pure imperative programming, while having the ability to convert most programs into symbolic programs to be run when product-level computing performance and deployment are required.
英語のヒント
上で述べたように、PyTorchは命令型プログラミングにもとづき、動的な計算グラフを使う。記号的プログラミングの移植性と効率を生かそうと、開発者たちは、両方のプログラミングのパラダイムの利点を組み合わせられないかを考えた。これがtorchscriptにつながった。torchscriptを使うと、ユーザーは純粋な命令型プログラミングで開発とデバッグを行いつつ、製品レベルの計算性能と配備が必要なときには、ほとんどのプログラムを記号的プログラムに変換して実行できる。