第6章構築者のための手引き
6.1.5. Exercises6.1.5 練習問題
- What kinds of problems will occur if you change
MySequentialto store modules in a Python list?英語のヒント
MySequentialを、モジュールをPythonのリストに保存するように変えると、どんな問題が起きるか。 - Implement a module that takes two modules as an argument, say
net1andnet2and returns the concatenated output of both networks in the forward propagation. This is also called a parallel module.英語のヒント
二つのモジュール、たとえばnet1とnet2を引数として受け取り、順伝播で両方のネットワークの出力を連結したものを返すモジュールを実装せよ。これは並列モジュールとも呼ばれる。 - Assume that you want to concatenate multiple instances of the same network. Implement a factory function that generates multiple instances of the same module and build a larger network from it.
英語のヒント
同じネットワークの複数のインスタンスを連結したいとする。同じモジュールの複数のインスタンスを生成するファクトリー関数を実装し、それからより大きなネットワークを作れ。