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
...@@ -87,6 +87,12 @@ ...@@ -87,6 +87,12 @@
<version>${cnnarch-gluon-generator.version}</version> <version>${cnnarch-gluon-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-tensorflow-generator</artifactId> <artifactId>cnnarch-tensorflow-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() {
......
...@@ -240,15 +240,13 @@ public class EMADLGenerator { ...@@ -240,15 +240,13 @@ public class EMADLGenerator {
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;
boolean alreadyTrained = newHashes.contains(trainingHash) || isAlreadyTrained(trainingHash, componentInstance); boolean alreadyTrained = newHashes.contains(trainingHash) || isAlreadyTrained(trainingHash, componentInstance);
......
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