Some fixes: correct CMakeLists.txt generation for tensorflow dependencies and...

Some fixes: correct CMakeLists.txt generation for tensorflow dependencies and the gloun part in backend.java and pom.xml added
parent 8ef4c449
......@@ -81,6 +81,12 @@
<version>${cnnarch-mxnet-generator.version}</version>
</dependency>
<dependency>
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>cnnarch-gluon-generator</artifactId>
<version>${cnnarch-gluon-generator.version}</version>
</dependency>
<dependency>
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>cnnarch-gluon-generator</artifactId>
......
package de.monticore.lang.monticar.emadl.generator;
import de.monticore.lang.monticar.cnnarch.generator.CNNArchGenerator;
import de.monticore.lang.monticar.cnnarch.generator.CNNTrainGenerator;
import de.monticore.lang.monticar.cnnarch.gluongenerator.CNNArch2Gluon;
......@@ -45,7 +44,7 @@ public enum Backend {
public CNNTrainGenerator getCNNTrainGenerator() {
return new CNNTrain2Gluon(new RewardFunctionCppGenerator());
}
};
},
TENSORFLOW{
@Override
public CNNArchGenerator getCNNArchGenerator() {
......@@ -69,7 +68,7 @@ public enum Backend {
case "GLUON":
return Optional.of(GLUON);
case "TENSORFLOW":
return Optional.of(TENSORFLOW);
......
......@@ -239,15 +239,13 @@ public class EMADLGenerator {
String b = backend.getBackendString(backend);
String trainingDataHash = "";
String testDataHash = "";
if (architecture.get().getDataPath() != null) {
if (b.equals("CAFFE2")) {
trainingDataHash = getChecksumForFile(architecture.get().getDataPath() + "/train_lmdb/data.mdb");
testDataHash = getChecksumForFile(architecture.get().getDataPath() + "/test_lmdb/data.mdb");
} else {
trainingDataHash = getChecksumForFile(architecture.get().getDataPath() + "/train.h5");
testDataHash = getChecksumForFile(architecture.get().getDataPath() + "/test.h5");
}
if(b.equals("CAFFE2")){ //TODO: TensorFlow (really? we can use .h5 files for tensorflow, a seperate library is used anyway, see the example code)
trainingDataHash = getChecksumForFile(architecture.get().getDataPath() + "/train_lmdb/data.mdb");
testDataHash = getChecksumForFile(architecture.get().getDataPath() + "/test_lmdb/data.mdb");
}else{
trainingDataHash = getChecksumForFile(architecture.get().getDataPath() + "/train.h5");
testDataHash = getChecksumForFile(architecture.get().getDataPath() + "/test.h5");
}
String trainingHash = emadlHash + "#" + cnntHash + "#" + trainingDataHash + "#" + testDataHash;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment