use of org.nd4j.weightinit.impl.OneInitScheme in project nd4j by deeplearning4j.
the class SameDiffTests method testLinearModule2.
@Test
public void testLinearModule2() {
Linear linear = Linear.execBuilder().nIn(3).nOut(2).weightInitScheme(new OneInitScheme('f')).biasWeightInitScheme(new ZeroInitScheme('f')).build();
linear.exec(Nd4j.linspace(1, 6, 6).reshape(2, 3));
INDArray assertion = Nd4j.create(new double[][] { { 6, 6 }, { 15, 15 } });
assertEquals(assertion, linear.outputArguments()[0]);
}
Aggregations