def sigmoid_backward(dout, cache):
    """
    backward of sigmoid function, dx = x(x-1)
    :param dout: grad of outputs
    :param cache: cache stored before
    :return: dx
    """
    x = cache
    return x * (x - 1) * dout