Commit 973040f6 authored by Sebastian Nickels's avatar Sebastian Nickels

Added Embedding layer and fixed a bug where member wasn't set if the layer is...

Added Embedding layer and fixed a bug where member wasn't set if the layer is used directly without layer variable
parent acf49043
......@@ -8,15 +8,15 @@
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>cnnarch-generator</artifactId>
<version>0.0.3-SNAPSHOT</version>
<version>0.0.4-SNAPSHOT</version>
<!-- == PROJECT DEPENDENCIES ============================================= -->
<properties>
<!-- .. SE-Libraries .................................................. -->
<CNNArch.version>0.3.2-SNAPSHOT</CNNArch.version>
<CNNTrain.version>0.3.4-SNAPSHOT</CNNTrain.version>
<CNNArch.version>0.3.3-SNAPSHOT</CNNArch.version>
<CNNTrain.version>0.3.6-SNAPSHOT</CNNTrain.version>
<embedded-montiarc-math-opt-generator>0.1.4</embedded-montiarc-math-opt-generator>
<!-- .. Libraries .................................................. -->
......
......@@ -85,9 +85,13 @@ public class ArchitectureElementData {
}
public String getMember() {
assert getElement() instanceof VariableSymbol;
if (getElement() instanceof VariableSymbol) {
return ((VariableSymbol) getElement()).getMember().toString();
}
else {
return VariableSymbol.Member.NONE.toString();
}
return ((VariableSymbol) getElement()).getMember().toString();
}
public int getConstValue() {
......@@ -156,6 +160,14 @@ public class ArchitectureElementData {
return getLayerSymbol().getIntValue(AllPredefinedLayers.LAYERS_NAME).get();
}
public int getInputDim(){
return getLayerSymbol().getIntValue(AllPredefinedLayers.INPUT_DIM_NAME).get();
}
public int getOutputDim(){
return getLayerSymbol().getIntValue(AllPredefinedLayers.OUTPUT_DIM_NAME).get();
}
@Nullable
public String getPoolType(){
return getLayerSymbol().getStringValue(AllPredefinedLayers.POOL_TYPE_NAME).get();
......
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