Search in sources :

Example 1 with Increment

use of com.tencent.angel.ml.matrix.psf.update.Increment in project angel by Tencent.

the class UpdateFuncTest method testIncrement.

@Test
public void testIncrement() throws Exception {
    UpdateFunc func = new Increment(w2Client.getMatrixId(), 3, localArray1);
    w2Client.update(func).get();
    double[] result = pull(w2Client, 3);
    assert (result.length == dim);
    for (int i = 0; i < result.length; i++) {
        Assert.assertEquals(result[i], 0.0 + localArray1[i], delta);
    }
}
Also used : CompressUpdateFunc(com.tencent.angel.ml.matrix.psf.update.enhance.CompressUpdateFunc) UpdateFunc(com.tencent.angel.ml.matrix.psf.update.enhance.UpdateFunc) Increment(com.tencent.angel.ml.matrix.psf.update.Increment) Test(org.junit.Test)

Aggregations

Increment (com.tencent.angel.ml.matrix.psf.update.Increment)1 CompressUpdateFunc (com.tencent.angel.ml.matrix.psf.update.enhance.CompressUpdateFunc)1 UpdateFunc (com.tencent.angel.ml.matrix.psf.update.enhance.UpdateFunc)1 Test (org.junit.Test)1