@Test public void when_transformIsCalled_expect_inputNormalized() { SimpleNormalizationTransform sut = new SimpleNormalizationTransform(1.0, 11.0); INDArray input = Nd4j.create(new double[] { 1.0, 11.0 }); INDArray result = sut.transform(input); assertEquals(0.0, result.getDouble(0), 0.00001); assertEquals(1.0, result.getDouble(1), 0.00001); }
@Override public INDArray transform(INDArray input) { if(offset != 0.0) { input.subi(offset); } input.divi(divisor); return input; }
SimpleNormalizationTransform implements Operation<INDArray, INDArray> { @Override public INDArray transform(INDArray input) { if(offset != 0.0) { input.subi(offset); } input.divi(divisor); return input; } }
SimpleNormalizationTransform implements Operation<INDArray, INDArray> { @Override public INDArray transform(INDArray input) { if(offset != 0.0) { input.subi(offset); } input.divi(divisor); return input; } SimpleNormalizationTransform(double min, double max); }
SimpleNormalizationTransform implements Operation<INDArray, INDArray> { @Override public INDArray transform(INDArray input) { if(offset != 0.0) { input.subi(offset); } input.divi(divisor); return input; } SimpleNormalizationTransform(double min, double max); @Override INDArray transform(INDArray input); }
SimpleNormalizationTransform implements Operation<INDArray, INDArray> { @Override public INDArray transform(INDArray input) { if(offset != 0.0) { input.subi(offset); } input.divi(divisor); return input; } SimpleNormalizationTransform(double min, double max); @Override INDArray transform(INDArray input);  }