| 36 | |
| 37 | |
| 38 | class DoubleLinear(layer.Layer): |
| 39 | |
| 40 | def __init__(self, a, b, c): |
| 41 | super(DoubleLinear, self).__init__() |
| 42 | self.l1 = layer.Linear(a, b) |
| 43 | self.l2 = layer.Linear(b, c) |
| 44 | |
| 45 | def forward(self, x): |
| 46 | y = self.l1(x) |
| 47 | y = self.l2(y) |
| 48 | return y |
| 49 | |
| 50 | |
| 51 | class MyModel(model.Model): |