Java Code Examples for org.nd4j.linalg.factory.Nd4j#MAX_SLICES_TO_PRINT

The following examples show how to use org.nd4j.linalg.factory.Nd4j#MAX_SLICES_TO_PRINT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BaseNd4jTest.java    From nd4j with Apache License 2.0 5 votes vote down vote up
@Before
public void before() throws Exception {
    log.info("Running " + getClass().getName() + " on backend " + backend.getClass().getName());
    Nd4j nd4j = new Nd4j();
    nd4j.initWithBackend(backend);
    Nd4j.factory().setOrder(ordering());
    Nd4j.MAX_ELEMENTS_PER_SLICE = -1;
    Nd4j.MAX_SLICES_TO_PRINT = -1;
}
 
Example 2
Source File: BaseNd4jTest.java    From nd4j with Apache License 2.0 5 votes vote down vote up
@After
public void after() throws Exception {
    log.info("Ending " + getClass().getName());
    if (System.getProperties().getProperty("backends") != null
                    && !System.getProperty("backends").contains(backend.getClass().getName()))
        return;
    Nd4j nd4j = new Nd4j();
    nd4j.initWithBackend(backend);
    Nd4j.factory().setOrder(ordering());
    Nd4j.MAX_ELEMENTS_PER_SLICE = -1;
    Nd4j.MAX_SLICES_TO_PRINT = -1;
}
 
Example 3
Source File: OpExecutionerTestsC.java    From nd4j with Apache License 2.0 5 votes vote down vote up
@Test
public void testColumnStd() {
    Nd4j.MAX_ELEMENTS_PER_SLICE = Integer.MAX_VALUE;
    Nd4j.MAX_SLICES_TO_PRINT = Integer.MAX_VALUE;
    INDArray twoByThree = Nd4j.linspace(1, 600, 600).reshape(150, 4);
    INDArray columnStd = twoByThree.std(0);
    INDArray assertion = Nd4j.create(new float[] {173.78147196982766f, 173.78147196982766f, 173.78147196982766f,
                    173.78147196982766f});
    assertEquals(assertion, columnStd);
}