以前から『static graph』のメリットとして、並列化処理の最適化やリソース請求の合理化などを通じて、一般に実行の速度が速いという記憶がありますけれども、
たびたび逆のような話にも遭遇します。
例えば、最近読んだ記事(↓)にもそのような事を書かれていますが、理解できませんでした。
It uses dynamic graph creation, which enables more flexibility in computation. For example, imagine you’re creating a network like HyperNetworks (by David Ha) or “Thin Nets”, the weight matrix of the graph would be generated statically, this would massively slow down the framework. The ability of PyTorch(『static graph』) to do this on the fly allows this process to go very smoothly.
##END
要は dynamic graphのほうは遅いけれども、 『static graph』なら速いという話しですね。
どうして?
その理由についてご説明いただけませんか。
あなたの回答
tips
プレビュー