def ComputeAccuracy(net, x_test, y_test):
    """
    Compute the accuracy of net
    :param net: the neural network
    :param x_test: inputs of test dataset
    :param y_test: labels of test dataset
    :return: the accuracy in test dataset
    """
    pred = net.predict(x_test)
    temp = 0
    row, column = pred.shape
    for i in range(row):
        for j in range(column):
            if pred[i, j] >= 0.5:
                pred[i, j] = 1
            else:
                pred[i, j] = 0
        if (pred[i] == y_test[i]).all():
            temp += 1
    acc = temp / row
    return acc