'Update the parameters associated with this edge.'

def UpdateEdgeParams(self, edge, step):

    numcases = edge.node1.batchsize
    edge.gradient.add_mult(edge.suff_stats, ((-1.0) / numcases))
    if edge.tied_to:
        edge.tied_to.gradient.add(edge.gradient)
        edge.gradient.assign(0)
        edge = edge.tied_to
    edge.num_grads_received += 1
    if (edge.num_grads_received == edge.num_shares):
        edge.Update('weight', step)
