| 14 | |
| 15 | |
| 16 | class Simple(Module): |
| 17 | def __init__(self, param_shape): |
| 18 | super().__init__() |
| 19 | self.params = [ |
| 20 | Parameter(np.ones(param_shape), dtype=np.float32) for i in range(10) |
| 21 | ] |
| 22 | |
| 23 | def forward(self, x): |
| 24 | for p in self.params: |
| 25 | x = x * p |
| 26 | return x |
| 27 | |
| 28 | |
| 29 | @pytest.mark.require_ngpu(2) |