@Test
public void check_four() {

	for( boolean sub : new boolean[]{false,true}) {
		FunctionBatchNorm_F32 alg = new FunctionBatchNorm_F32(true);
		alg.initialize(d0, d1);
		alg.setEPS(EPS);
		Tensor_F32 input = TensorFactory_F32.random(random, sub, N, d0, d1);
		Tensor_F32 params = TensorFactory_F32.random(random, sub, d0, d1, 4);
		Tensor_F32 output = TensorFactory_F32.random(random, sub, N, d0, d1);
		Tensor_F32 expected = new Tensor_F32(N, d0, d1);
		for (int batch = 0; batch < N; batch++) {
			int indexIn = input.idx(batch, 0, 0);
			int indexP = params.idx(0,0,0);
			int indexOut = expected.idx(batch,0,0);
			for (int i = 0; i < D; i++) {
				float m = params.d[indexP++];
				float v = params.d[indexP++];
				float g = params.d[indexP++];
				float b = params.d[indexP++];
				expected.d[indexOut++] = ((input.d[indexIn++]-m) / (float)Math.sqrt(v+EPS))*g+b;
			}
		}
		alg.setParameters(WT(params));
		alg.forward(input, output);
		DeepUnitTest.assertEquals(expected,output, DeepBoofConstants.TEST_TOL_F32);
	}
}