Commit 31fca28b authored by Julian Dierkes's avatar Julian Dierkes

made changes to make generator work with changes in CNNTrain regarding map type in grammar

parent 418c39ab
......@@ -19,7 +19,7 @@
<CNNArch.version>0.3.4-SNAPSHOT</CNNArch.version>
<CNNTrain.version>0.3.9-SNAPSHOT</CNNTrain.version>
<embedded-montiarc-math-opt-generator>0.1.5</embedded-montiarc-math-opt-generator>
<embedded-montiarc-math-opt-generator>0.1.6</embedded-montiarc-math-opt-generator>
<!-- .. Libraries .................................................. -->
<guava.version>18.0</guava.version>
......
......@@ -250,11 +250,11 @@ public class ArchitectureElementData {
return Arrays.asList(bottomPad, rightPad);
}
public boolean getStart() {
/*public boolean getStart() {
return getLayerSymbol().getBooleanValue(AllPredefinedLayers.START_NAME).get();
}
public boolean getEnd() {
return getLayerSymbol().getBooleanValue(AllPredefinedLayers.END_NAME).get();
}
}*/
}
\ No newline at end of file
......@@ -2,6 +2,8 @@
package de.monticore.lang.monticar.cnnarch.generator;
import de.monticore.lang.monticar.cnntrain._symboltable.*;
import jline.internal.Log;
import static de.monticore.lang.monticar.cnntrain.helper.ConfigEntryNameConstants.*;
import java.util.ArrayList;
......@@ -171,6 +173,27 @@ public class ConfigurationData {
return (Boolean) getConfiguration().getEntry("eval_train").getValue().getValue();
}
protected Map<String, Map<String, Object>> getMultiParamMapEntry(final String key, final String valueName) {
if (!configurationContainsKey(key)) {
return null;
}
Map<String, Map<String,Object>> resultView = new HashMap<>();
ValueSymbol value = this.getConfiguration().getEntryMap().get(key).getValue();
if (value instanceof MultiParamValueMapSymbol) {
MultiParamValueMapSymbol multiParamValueMap = (MultiParamValueMapSymbol) value;
resultView.putAll(multiParamValueMap.getParameters());
Map<String,String> names = multiParamValueMap.getMultiParamValueNames();
for(String distrName : names.keySet()) {
resultView.get(distrName).put(valueName, names.get(distrName));
}
}
return resultView;
}
protected Map<String, Object> getMultiParamEntry(final String key, final String valueName) {
if (!configurationContainsKey(key)) {
return null;
......
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