Commit 717ebb9a authored by nilsfreyer's avatar nilsfreyer
Browse files

Merge branch 'oneclick_nn_training' of...

Merge branch 'oneclick_nn_training' of https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP into oneclick_nn_training
parents 57cf485e 0efad449
Pipeline #99141 passed with stages
in 4 minutes and 40 seconds
......@@ -137,6 +137,7 @@ public class EMADLGenerator {
fileContentMap.put(f.getFileName(), f.getFileContent());
}
List<FileContent> fileContentsTrainingHashes = new ArrayList<>();
for (ExpandedComponentInstanceSymbol componentInstance : allInstances) {
ComponentSymbol component = componentInstance.getComponentType().getReferencedSymbol();
Optional<ArchitectureSymbol> architecture = component.getSpannedScope().resolve("", ArchitectureSymbol.KIND);
......@@ -174,7 +175,7 @@ public class EMADLGenerator {
System.out.println(trainingHash);
boolean alreadyTrained = isAlreadyTrained(trainingHash, componentInstance);
if(alreadyTrained) {
if((alreadyTrained && forced !="y") || forced=="n") {
System.out.println("Already trained");
}
else {
......@@ -207,10 +208,15 @@ public class EMADLGenerator {
}else{System.out.println("Trainingfile not found.");}
}
fileContents.add(new FileContent(trainingHash, componentConfigFilename + ".training_hash"));
fileContentsTrainingHashes.add(new FileContent(trainingHash, componentConfigFilename + ".training_hash"));
}
for (FileContent fileContent : fileContentsTrainingHashes) {
emamGen.generateFile(fileContent);
}
}
private static String convertByteArrayToHexString(byte[] arrayBytes) {
StringBuffer stringBuffer = new StringBuffer();
for (int i = 0; i < arrayBytes.length; i++) {
......
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