(self,xdata)
| 62 | return gradient_activation |
| 63 | |
| 64 | def forward_propagation(self,xdata): |
| 65 | self.xdata = xdata |
| 66 | if self.is_input_layer: |
| 67 | # input layer |
| 68 | self.wx_plus_b = xdata |
| 69 | self.output = xdata |
| 70 | return xdata |
| 71 | else: |
| 72 | self.wx_plus_b = np.dot(self.weight,self.xdata) - self.bias |
| 73 | self.output = self.activation(self.wx_plus_b) |
| 74 | return self.output |
| 75 | |
| 76 | def back_propagation(self,gradient): |
| 77 |