code: def returnMatches(kw, kv, n, theta, inputScaling=1.0):
    
    # How many weight vectors and input vectors to generate at a time
    m1 = 4
    m2 = 1000
  
    weights = getSparseTensor(kw, n, m1, fixedRange=1.0 / kw)
  
    # Initialize random input vectors using given scaling and see how many match
    inputVectors = getSparseTensor(kv, n, m2,
                                   onlyPositive=True,
                                   fixedRange= 2*inputScaling / kw,
                                   )
    dot = inputVectors.matmul(weights.t())
    numMatches = ((dot >= theta).sum()).item()
    pctMatches = numMatches / float(m1*m2)
  
    return pctMatches, numMatches, m1*m2
docs: :param kw: k for the weight vectors
    :param kv: k for the input vectors
    :param n:  dimensionality of input vector
    :param theta: threshold for matching after dot product
  
    :return: percent that matched, number that matched, total match comparisons