(self, x)
| 39 | self.softmax_cross_entropy = layer.SoftMaxCrossEntropy() |
| 40 | |
| 41 | def forward(self, x): |
| 42 | y = self.conv1(x) |
| 43 | y = self.pooling1(y) |
| 44 | y = self.conv2(y) |
| 45 | y = self.pooling2(y) |
| 46 | y = self.flatten(y) |
| 47 | y = self.linear1(y) |
| 48 | y = self.relu(y) |
| 49 | y = self.linear2(y) |
| 50 | return y |
| 51 | |
| 52 | def train_one_batch(self, x, y, dist_option, spars): |
| 53 | out = self.forward(x) |