def rotate_towards(old_W, new_W, new_coeff):

    norms = theano_norms(new_W)

    # update, scaled back onto unit sphere
    scal_points = new_W / norms.dimshuffle('x',0)

    # dot product between scaled update and current W
    dot_update = (old_W * scal_points).sum(axis=0)

    theta = T.arccos(dot_update)

    rot_amt = new_coeff * theta

    new_basis_dir = scal_points - dot_update * old_W

    new_basis_norms = theano_norms(new_basis_dir)

    new_basis = new_basis_dir / new_basis_norms

    rval = T.cos(rot_amt) * old_W + T.sin(rot_amt) * new_basis

    return rval
Adds the worker to the database, if not yet there. Returns the socket ID
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/models/s3c.py/rotate_towards--crossover with--dataset/ETHPy150Open codalab/codalab-cli/codalab/model/worker_model.py/WorkerModel.worker_checkin