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 @@ ...@@ -81,6 +81,12 @@
<version>${cnnarch-mxnet-generator.version}</version> <version>${cnnarch-mxnet-generator.version}</version>
</dependency> </dependency>
<dependency>
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>cnnarch-gluon-generator</artifactId>
<version>${cnnarch-gluon-generator.version}</version>
</dependency>
<dependency> <dependency>
<groupId>de.monticore.lang.monticar</groupId> <groupId>de.monticore.lang.monticar</groupId>
<artifactId>cnnarch-gluon-generator</artifactId> <artifactId>cnnarch-gluon-generator</artifactId>
......
package de.monticore.lang.monticar.emadl.generator; package de.monticore.lang.monticar.emadl.generator;
import de.monticore.lang.monticar.cnnarch.generator.CNNArchGenerator; import de.monticore.lang.monticar.cnnarch.generator.CNNArchGenerator;
import de.monticore.lang.monticar.cnnarch.generator.CNNTrainGenerator; import de.monticore.lang.monticar.cnnarch.generator.CNNTrainGenerator;
import de.monticore.lang.monticar.cnnarch.gluongenerator.CNNArch2Gluon; import de.monticore.lang.monticar.cnnarch.gluongenerator.CNNArch2Gluon;
...@@ -45,7 +44,7 @@ public enum Backend { ...@@ -45,7 +44,7 @@ public enum Backend {
public CNNTrainGenerator getCNNTrainGenerator() { public CNNTrainGenerator getCNNTrainGenerator() {
return new CNNTrain2Gluon(new RewardFunctionCppGenerator()); return new CNNTrain2Gluon(new RewardFunctionCppGenerator());
} }
}; },
TENSORFLOW{ TENSORFLOW{
@Override @Override
public CNNArchGenerator getCNNArchGenerator() { public CNNArchGenerator getCNNArchGenerator() {
...@@ -69,7 +68,7 @@ public enum Backend { ...@@ -69,7 +68,7 @@ public enum Backend {
case "GLUON": case "GLUON":
return Optional.of(GLUON); return Optional.of(GLUON);
case "TENSORFLOW": case "TENSORFLOW":
return Optional.of(TENSORFLOW); return Optional.of(TENSORFLOW);
......
...@@ -239,15 +239,13 @@ public class EMADLGenerator { ...@@ -239,15 +239,13 @@ public class EMADLGenerator {
String b = backend.getBackendString(backend); String b = backend.getBackendString(backend);
String trainingDataHash = ""; String trainingDataHash = "";
String testDataHash = ""; String testDataHash = "";
if (architecture.get().getDataPath() != null) { if(b.equals("CAFFE2")){ //TODO: TensorFlow (really? we can use .h5 files for tensorflow, a seperate library is used anyway, see the example code)
if (b.equals("CAFFE2")) { trainingDataHash = getChecksumForFile(architecture.get().getDataPath() + "/train_lmdb/data.mdb");
trainingDataHash = getChecksumForFile(architecture.get().getDataPath() + "/train_lmdb/data.mdb"); testDataHash = getChecksumForFile(architecture.get().getDataPath() + "/test_lmdb/data.mdb");
testDataHash = getChecksumForFile(architecture.get().getDataPath() + "/test_lmdb/data.mdb"); }else{
} else { trainingDataHash = getChecksumForFile(architecture.get().getDataPath() + "/train.h5");
trainingDataHash = getChecksumForFile(architecture.get().getDataPath() + "/train.h5"); testDataHash = getChecksumForFile(architecture.get().getDataPath() + "/test.h5");
testDataHash = getChecksumForFile(architecture.get().getDataPath() + "/test.h5");
}
} }
String trainingHash = emadlHash + "#" + cnntHash + "#" + trainingDataHash + "#" + testDataHash; 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