(self, data)
| 337 | return np.asarray(res) |
| 338 | |
| 339 | def convolution(self, data): |
| 340 | # return the data of image after convoluting process so we can check it out |
| 341 | data_test = np.asmatrix(data) |
| 342 | _data_focus1, data_conved1 = self.convolute( |
| 343 | data_test, |
| 344 | self.conv1, |
| 345 | self.w_conv1, |
| 346 | self.thre_conv1, |
| 347 | conv_step=self.step_conv1, |
| 348 | ) |
| 349 | data_pooled1 = self.pooling(data_conved1, self.size_pooling1) |
| 350 | |
| 351 | return data_conved1, data_pooled1 |
| 352 | |
| 353 | |
| 354 | if __name__ == "__main__": |