def test_cross_entropy_error(self): """ :return: """ self.assertLess( loss_function.cross_entropy_error(np.array(self.y1), np.array(self.t)), loss_function.cross_entropy_error(np.array(self.y2), np.array(self.t)))
def loss(self, x, t): y = self.predict(x) return cross_entropy_error(y, t)
def loss(self, x, t): z = self.predict(x) y = softmax(z) loss = cross_entropy_error(y, t) return loss
def forward(self, x, t): self.t = t self.y = self.softmax(x) self.loss = cross_entropy_error(self.y, self.t) return self.loss
def loss(self): z = self.predict() y = softmax(z) loss = cross_entropy_error(y, self.t) return loss
def loss(self): y = self.predict() return cross_entropy_error(y, self.t)