2021-02-01 06:31:20 +01:00
|
|
|
/*
|
|
|
|
* ******************************************************************************
|
|
|
|
* *
|
|
|
|
* *
|
|
|
|
* * This program and the accompanying materials are made available under the
|
|
|
|
* * terms of the Apache License, Version 2.0 which is available at
|
|
|
|
* * https://www.apache.org/licenses/LICENSE-2.0.
|
|
|
|
* *
|
2021-02-01 09:47:29 +01:00
|
|
|
* * See the NOTICE file distributed with this work for additional
|
|
|
|
* * information regarding copyright ownership.
|
2021-02-01 06:31:20 +01:00
|
|
|
* * Unless required by applicable law or agreed to in writing, software
|
|
|
|
* * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* * License for the specific language governing permissions and limitations
|
|
|
|
* * under the License.
|
|
|
|
* *
|
|
|
|
* * SPDX-License-Identifier: Apache-2.0
|
|
|
|
* *****************************************************************************
|
|
|
|
*/
|
2019-06-06 14:21:15 +02:00
|
|
|
|
|
|
|
package org.deeplearning4j.integration;
|
|
|
|
|
2020-01-04 03:45:07 +01:00
|
|
|
import org.deeplearning4j.BaseDL4JTest;
|
2020-03-07 12:44:41 +01:00
|
|
|
import org.deeplearning4j.integration.testcases.dl4j.*;
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2022-09-20 15:40:53 +02:00
|
|
|
import org.junit.jupiter.api.AfterAll;
|
2021-03-16 03:57:24 +01:00
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
import org.junit.jupiter.api.io.TempDir;
|
|
|
|
|
2022-09-20 15:40:53 +02:00
|
|
|
import java.io.File;
|
2022-10-07 10:49:08 +02:00
|
|
|
import java.nio.file.Path;
|
2021-03-16 03:57:24 +01:00
|
|
|
|
|
|
|
|
2022-09-20 15:40:53 +02:00
|
|
|
////@Ignore("AB - 2019/05/27 - Integration tests need to be updated")
|
2020-03-07 12:44:41 +01:00
|
|
|
public class IntegrationTestsDL4J extends BaseDL4JTest {
|
|
|
|
|
2022-09-20 15:40:53 +02:00
|
|
|
@TempDir
|
2022-10-07 10:49:08 +02:00
|
|
|
public Path testDir;
|
2019-06-06 14:21:15 +02:00
|
|
|
|
2022-09-20 15:40:53 +02:00
|
|
|
@AfterAll
|
2019-06-06 14:21:15 +02:00
|
|
|
public static void afterClass(){
|
|
|
|
IntegrationTestRunner.printCoverageInformation();
|
|
|
|
}
|
|
|
|
|
|
|
|
// ***** MLPTestCases *****
|
2020-03-07 12:44:41 +01:00
|
|
|
@Test
|
2019-06-06 14:21:15 +02:00
|
|
|
public void testMLPMnist() throws Exception {
|
|
|
|
IntegrationTestRunner.runTest(MLPTestCases.getMLPMnist(), testDir);
|
|
|
|
}
|
|
|
|
|
2020-03-07 12:44:41 +01:00
|
|
|
@Test
|
2019-06-06 14:21:15 +02:00
|
|
|
public void testMlpMoon() throws Exception {
|
|
|
|
IntegrationTestRunner.runTest(MLPTestCases.getMLPMoon(), testDir);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ***** RNNTestCases *****
|
2020-03-07 12:44:41 +01:00
|
|
|
@Test
|
2019-06-06 14:21:15 +02:00
|
|
|
public void testRnnSeqClassification1() throws Exception {
|
|
|
|
IntegrationTestRunner.runTest(RNNTestCases.getRnnCsvSequenceClassificationTestCase1(), testDir);
|
|
|
|
}
|
|
|
|
|
2020-03-07 12:44:41 +01:00
|
|
|
@Test
|
2019-06-06 14:21:15 +02:00
|
|
|
public void testRnnSeqClassification2() throws Exception {
|
|
|
|
IntegrationTestRunner.runTest(RNNTestCases.getRnnCsvSequenceClassificationTestCase2(), testDir);
|
|
|
|
}
|
|
|
|
|
2020-03-07 12:44:41 +01:00
|
|
|
@Test
|
2019-06-06 14:21:15 +02:00
|
|
|
public void testRnnCharacter() throws Exception {
|
|
|
|
IntegrationTestRunner.runTest(RNNTestCases.getRnnCharacterTestCase(), testDir);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ***** CNN1DTestCases *****
|
2020-03-07 12:44:41 +01:00
|
|
|
@Test
|
2019-06-06 14:21:15 +02:00
|
|
|
public void testCnn1dCharacter() throws Exception {
|
|
|
|
IntegrationTestRunner.runTest(CNN1DTestCases.getCnn1dTestCaseCharRNN(), testDir);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ***** CNN2DTestCases *****
|
2020-03-07 12:44:41 +01:00
|
|
|
@Test
|
2019-06-06 14:21:15 +02:00
|
|
|
public void testLenetMnist() throws Exception {
|
|
|
|
IntegrationTestRunner.runTest(CNN2DTestCases.getLenetMnist(), testDir);
|
|
|
|
}
|
|
|
|
|
2020-03-07 12:44:41 +01:00
|
|
|
@Test
|
2019-06-06 14:21:15 +02:00
|
|
|
public void testYoloHouseNumbers() throws Exception {
|
|
|
|
IntegrationTestRunner.runTest(CNN2DTestCases.getYoloHouseNumbers(), testDir);
|
|
|
|
}
|
|
|
|
|
2020-03-07 12:44:41 +01:00
|
|
|
@Test
|
2019-06-06 14:21:15 +02:00
|
|
|
public void testCnn2DLenetTransferDropoutRepeatability() throws Exception {
|
|
|
|
IntegrationTestRunner.runTest(CNN2DTestCases.testLenetTransferDropoutRepeatability(), testDir);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ***** CNN3DTestCases *****
|
2020-03-07 12:44:41 +01:00
|
|
|
@Test
|
2019-06-06 14:21:15 +02:00
|
|
|
public void testCnn3dSynthetic() throws Exception {
|
|
|
|
IntegrationTestRunner.runTest(CNN3DTestCases.getCnn3dTestCaseSynthetic(), testDir);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ***** UnsupervisedTestCases *****
|
2020-03-07 12:44:41 +01:00
|
|
|
@Test
|
2019-06-06 14:21:15 +02:00
|
|
|
public void testVAEMnistAnomaly() throws Exception {
|
|
|
|
IntegrationTestRunner.runTest(UnsupervisedTestCases.getVAEMnistAnomaly(), testDir);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ***** TransferLearningTestCases *****
|
2020-03-07 12:44:41 +01:00
|
|
|
@Test
|
2019-06-06 14:21:15 +02:00
|
|
|
public void testVgg16Transfer() throws Exception {
|
|
|
|
IntegrationTestRunner.runTest(CNN2DTestCases.getVGG16TransferTinyImagenet(), testDir);
|
|
|
|
}
|
|
|
|
}
|