def accuracy(self, x, t):
    y = self.predict(x)
    y = np.argmax(y, axis=1)
    if (t.ndim != 1):
        t = np.argmax(t, axis=1)
    accuracy = (np.sum((y == t)) / float(x.shape[0]))
    return accuracy
def accuracy(self, x, t):
    y = self.predict(x)
    y = np.argmax(y, axis=1)
    if (t.ndim != 1):
        t = np.argmax(t, axis=1)
    accuracy = (np.sum((y == t)) / float(x.shape[0]))
    return accuracy