Ejemplo n.º 1
0
def computeDFT(dataset, execTimes):
    result, compute_time, communication_time, decode_time = matrixMulKernelMaster(
        0, dataset, execTimes)
    #weights = DFTMatrix(NUM_BINS)
    #verify = dataset.dot(weights)
    #print 'verifying results, maximum of the element difference is', np.max(np.abs(result-verify))
    return result, compute_time, communication_time, decode_time
Ejemplo n.º 2
0
def computeGrad(k, n, iteration, dataset, weights, partitions, execTimes):
    result, compute_time, communication_time, decode_time = matrixMulKernelMaster(iteration, dataset, execTimes)
    return result, compute_time, communication_time, decode_time
Ejemplo n.º 3
0
def computeProb(k, n, iteration, dataset, weights, partitions, execTimes):
    result, compute_time, communication_time, decode_time = matrixMulKernelMaster(iteration, dataset, execTimes)
    result = 1.0 / (1 + np.exp(-1*result))  
    return result, compute_time, communication_time, decode_time