Commit d1813cec authored by Julian Dierkes's avatar Julian Dierkes

fixed merge conflicts

parents 8190a3b7 56fe94bb
......@@ -9,7 +9,7 @@
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>cnnarch-generator</artifactId>
<version>0.0.4-SNAPSHOT</version>
<version>0.0.5-SNAPSHOT</version>
<!-- == PROJECT DEPENDENCIES ============================================= -->
......@@ -17,8 +17,8 @@
<!-- .. SE-Libraries .................................................. -->
<CNNArch.version>0.3.3-SNAPSHOT</CNNArch.version>
<CNNTrain.version>0.3.8-SNAPSHOT</CNNTrain.version>
<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>
<!-- .. Libraries .................................................. -->
......
......@@ -178,7 +178,7 @@ public class ArchitectureElementData {
@Nullable
public List<Integer> getPadding(){
String pad = ((LayerSymbol) getElement()).getStringValue(AllPredefinedLayers.PADDING_NAME).get();
if(pad.equals("same")){
......@@ -229,7 +229,7 @@ public class ArchitectureElementData {
}
@Nullable
public List<Integer> getTransPadding(LayerSymbol layer){
public List<Integer> getTransPadding(LayerSymbol layer) {
List<Integer> kernel = layer.getIntTupleValue(AllPredefinedLayers.KERNEL_NAME).get();
List<Integer> stride = layer.getIntTupleValue(AllPredefinedLayers.STRIDE_NAME).get();
ArchTypeSymbol inputType = layer.getInputTypes().get(0);
......@@ -238,10 +238,10 @@ public class ArchitectureElementData {
int heightPad = kernel.get(0) - stride.get(0);
int widthPad = kernel.get(1) - stride.get(1);
int topPad = (int)Math.ceil(heightPad / 2.0);
int bottomPad = (int)Math.floor(heightPad / 2.0);
int leftPad = (int)Math.ceil(widthPad / 2.0);
int rightPad = (int)Math.floor(widthPad / 2.0);
int topPad = (int) Math.ceil(heightPad / 2.0);
int bottomPad = (int) Math.floor(heightPad / 2.0);
int leftPad = (int) Math.ceil(widthPad / 2.0);
int rightPad = (int) Math.floor(widthPad / 2.0);
/*if (topPad == 0 && bottomPad == 0 && leftPad == 0 && rightPad == 0){
return null;
......@@ -249,4 +249,12 @@ public class ArchitectureElementData {
return Arrays.asList(bottomPad, rightPad);
}
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
......@@ -48,6 +48,20 @@ public class ConfigurationData {
return (Boolean) getConfiguration().getEntry("load_checkpoint").getValue().getValue();
}
public String getCheckpointPeriod() {
if (!getConfiguration().getEntryMap().containsKey("checkpoint_period")) {
return null;
}
return String.valueOf(getConfiguration().getEntry("checkpoint_period").getValue());
}
public String getLogPeriod() {
if (!getConfiguration().getEntryMap().containsKey("log_period")) {
return null;
}
return String.valueOf(getConfiguration().getEntry("log_period").getValue());
}
public Boolean getNormalize() {
if (!getConfiguration().getEntryMap().containsKey("normalize")) {
return null;
......@@ -143,6 +157,20 @@ public class ConfigurationData {
return (Boolean) getConfiguration().getEntry("save_attention_image").getValue().getValue();
}
public Boolean getUseTeacherForcing() {
if (!getConfiguration().getEntryMap().containsKey("use_teacher_forcing")) {
return null;
}
return (Boolean) getConfiguration().getEntry("use_teacher_forcing").getValue().getValue();
}
public Boolean getEvalTrain() {
if (!getConfiguration().getEntryMap().containsKey("eval_train")) {
return null;
}
return (Boolean) getConfiguration().getEntry("eval_train").getValue().getValue();
}
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