parent
f8067f8f96
commit
6960418295
|
@ -6,3 +6,5 @@ RUN wget https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2
|
||||||
tar -xvf cmake-3.24.2.tar.gz && cd cmake-3.24.2 && \
|
tar -xvf cmake-3.24.2.tar.gz && cd cmake-3.24.2 && \
|
||||||
./bootstrap && make && make install
|
./bootstrap && make && make install
|
||||||
|
|
||||||
|
RUN echo "nameserver 8.8.8.8" >> /etc/resolv.conf
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ import org.deeplearning4j.nn.modelimport.keras.layers.convolutional.KerasSpaceTo
|
||||||
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork;
|
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork;
|
||||||
import org.junit.jupiter.api.Assertions;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.Timeout;
|
||||||
import org.nd4j.linalg.api.buffer.DataType;
|
import org.nd4j.linalg.api.buffer.DataType;
|
||||||
import org.nd4j.linalg.api.ndarray.INDArray;
|
import org.nd4j.linalg.api.ndarray.INDArray;
|
||||||
import org.nd4j.linalg.factory.Nd4j;
|
import org.nd4j.linalg.factory.Nd4j;
|
||||||
|
@ -48,6 +49,7 @@ import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||||
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@Timeout(300)
|
||||||
public class Keras2ModelConfigurationTest extends BaseDL4JTest {
|
public class Keras2ModelConfigurationTest extends BaseDL4JTest {
|
||||||
|
|
||||||
ClassLoader classLoader = getClass().getClassLoader();
|
ClassLoader classLoader = getClass().getClassLoader();
|
||||||
|
@ -231,11 +233,6 @@ public class Keras2ModelConfigurationTest extends BaseDL4JTest {
|
||||||
runModelConfigTest("modelimport/keras/configs/keras2/simple_add_tf_keras_2.json");
|
runModelConfigTest("modelimport/keras/configs/keras2/simple_add_tf_keras_2.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public long getTimeoutMilliseconds() {
|
|
||||||
return 999999999L;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void embeddingConcatTest() throws Exception {
|
public void embeddingConcatTest() throws Exception {
|
||||||
runModelConfigTest("/modelimport/keras/configs/keras2/model_concat_embedding_sequences_tf_keras_2.json");
|
runModelConfigTest("/modelimport/keras/configs/keras2/model_concat_embedding_sequences_tf_keras_2.json");
|
||||||
|
|
|
@ -32,6 +32,7 @@ import org.deeplearning4j.nn.modelimport.keras.exceptions.InvalidKerasConfigurat
|
||||||
import org.deeplearning4j.nn.modelimport.keras.exceptions.UnsupportedKerasConfigurationException;
|
import org.deeplearning4j.nn.modelimport.keras.exceptions.UnsupportedKerasConfigurationException;
|
||||||
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork;
|
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.Timeout;
|
||||||
import org.nd4j.common.resources.Resources;
|
import org.nd4j.common.resources.Resources;
|
||||||
import org.nd4j.linalg.convolution.Convolution;
|
import org.nd4j.linalg.convolution.Convolution;
|
||||||
import org.nd4j.linalg.factory.Nd4j;
|
import org.nd4j.linalg.factory.Nd4j;
|
||||||
|
@ -45,12 +46,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||||
* Test import of Keras models.
|
* Test import of Keras models.
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@Timeout(300)
|
||||||
public class KerasModelImportTest extends BaseDL4JTest {
|
public class KerasModelImportTest extends BaseDL4JTest {
|
||||||
@Override
|
|
||||||
public long getTimeoutMilliseconds() {
|
|
||||||
return 9999999999999L;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testH5WithoutTensorflowScope() throws Exception {
|
public void testH5WithoutTensorflowScope() throws Exception {
|
||||||
MultiLayerNetwork model = loadModel("modelimport/keras/tfscope/model.h5");
|
MultiLayerNetwork model = loadModel("modelimport/keras/tfscope/model.h5");
|
||||||
|
|
|
@ -44,10 +44,7 @@ import org.deeplearning4j.nn.modelimport.keras.utils.KerasModelUtils;
|
||||||
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork;
|
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork;
|
||||||
import org.deeplearning4j.nn.transferlearning.FineTuneConfiguration;
|
import org.deeplearning4j.nn.transferlearning.FineTuneConfiguration;
|
||||||
import org.deeplearning4j.nn.transferlearning.TransferLearning;
|
import org.deeplearning4j.nn.transferlearning.TransferLearning;
|
||||||
import org.junit.jupiter.api.Assertions;
|
import org.junit.jupiter.api.*;
|
||||||
import org.junit.jupiter.api.Disabled;
|
|
||||||
import org.junit.jupiter.api.Tag;
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
import org.junit.jupiter.api.io.TempDir;
|
import org.junit.jupiter.api.io.TempDir;
|
||||||
import org.nd4j.linalg.activations.Activation;
|
import org.nd4j.linalg.activations.Activation;
|
||||||
import org.nd4j.linalg.activations.IActivation;
|
import org.nd4j.linalg.activations.IActivation;
|
||||||
|
@ -78,6 +75,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||||
* @author dave@skymind.io, Max Pumperla
|
* @author dave@skymind.io, Max Pumperla
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@Timeout(300)
|
||||||
public class KerasModelEndToEndTest extends BaseDL4JTest {
|
public class KerasModelEndToEndTest extends BaseDL4JTest {
|
||||||
private static final String GROUP_ATTR_INPUTS = "inputs";
|
private static final String GROUP_ATTR_INPUTS = "inputs";
|
||||||
private static final String GROUP_ATTR_OUTPUTS = "outputs";
|
private static final String GROUP_ATTR_OUTPUTS = "outputs";
|
||||||
|
@ -93,11 +91,6 @@ public class KerasModelEndToEndTest extends BaseDL4JTest {
|
||||||
@TempDir
|
@TempDir
|
||||||
public File testDir;
|
public File testDir;
|
||||||
|
|
||||||
@Override
|
|
||||||
public long getTimeoutMilliseconds() {
|
|
||||||
return 900000000L; //Most benchmarks should run very quickly; large timeout is to avoid issues with unusually slow download of test resources
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void fileNotFoundEndToEnd() throws Exception {
|
public void fileNotFoundEndToEnd() throws Exception {
|
||||||
String modelPath = "modelimport/keras/examples/foo/bar.h5";
|
String modelPath = "modelimport/keras/examples/foo/bar.h5";
|
||||||
|
|
|
@ -29,6 +29,7 @@ import org.deeplearning4j.nn.modelimport.keras.KerasModel;
|
||||||
import org.deeplearning4j.nn.modelimport.keras.layers.convolutional.KerasSpaceToDepth;
|
import org.deeplearning4j.nn.modelimport.keras.layers.convolutional.KerasSpaceToDepth;
|
||||||
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork;
|
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.Timeout;
|
||||||
import org.junit.jupiter.api.io.TempDir;
|
import org.junit.jupiter.api.io.TempDir;
|
||||||
import org.nd4j.linalg.api.ndarray.INDArray;
|
import org.nd4j.linalg.api.ndarray.INDArray;
|
||||||
import org.nd4j.linalg.factory.Nd4j;
|
import org.nd4j.linalg.factory.Nd4j;
|
||||||
|
@ -45,16 +46,12 @@ import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@Timeout(300)
|
||||||
public class KerasWeightSettingTests extends BaseDL4JTest {
|
public class KerasWeightSettingTests extends BaseDL4JTest {
|
||||||
|
|
||||||
@TempDir
|
@TempDir
|
||||||
private File testDir;
|
private File testDir;
|
||||||
|
|
||||||
@Override
|
|
||||||
public long getTimeoutMilliseconds() {
|
|
||||||
return 9999999L;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSimpleLayersWithWeights() throws Exception {
|
public void testSimpleLayersWithWeights() throws Exception {
|
||||||
int[] kerasVersions = new int[]{1, 2};
|
int[] kerasVersions = new int[]{1, 2};
|
||||||
|
|
Loading…
Reference in New Issue