@Test
public void randomMM() {

	for( boolean sub : new boolean[]{false,true}) {
		Tensor_F32 tensor = TensorFactory_F32.randomMM(rand, sub, -1,1, 4, 3, 2);
		assertEquals(4, tensor.length(0));
		assertEquals(3, tensor.length(1));
		assertEquals(2, tensor.length(2));
		assertEquals(sub, tensor.isSub());
		int N = tensor.length();
		float sum = 0;
		for (int i = 0; i < N; i++) {
			float v = tensor.getAtIndex(i);
			assertTrue(v != 0);
			sum += v;
		}
		assertTrue(Math.abs(sum) < 4*3*2/2.0f);
	}
}