Commit 21269adf authored by Sebastian Nickels's avatar Sebastian Nickels

Some smaller changes for reusability in Caffe2

parent 65ed59d4
Pipeline #144103 failed with stages
in 2 minutes and 36 seconds
......@@ -16,7 +16,7 @@
<!-- .. SE-Libraries .................................................. -->
<CNNArch.version>0.3.0-SNAPSHOT</CNNArch.version>
<CNNTrain.version>0.2.6</CNNTrain.version>
<CNNTrain.version>0.3.0-SNAPSHOT</CNNTrain.version>
<embedded-montiarc-math-opt-generator>0.1.4</embedded-montiarc-math-opt-generator>
<!-- .. Libraries .................................................. -->
......
......@@ -49,8 +49,8 @@ public class CNNArch2MxNet extends CNNArchGenerator {
protected LayerSupportChecker layerSupportChecker;
public CNNArch2MxNet() {
architectureSupportChecker = new ArchitectureSupportChecker();
layerSupportChecker = new LayerSupportChecker();
architectureSupportChecker = new CNNArch2MxNetArchitectureSupportChecker();
layerSupportChecker = new CNNArch2MxNetLayerSupportChecker();
setGenerationTargetPath("./target/generated-sources-cnnarch/");
}
......
package de.monticore.lang.monticar.cnnarch.mxnetgenerator;
public class CNNArch2MxNetArchitectureSupportChecker extends ArchitectureSupportChecker {
public CNNArch2MxNetArchitectureSupportChecker() {}
}
package de.monticore.lang.monticar.cnnarch.mxnetgenerator;
import de.monticore.lang.monticar.cnnarch.predefined.AllPredefinedLayers;
public class CNNArch2MxNetLayerSupportChecker extends LayerSupportChecker {
public CNNArch2MxNetLayerSupportChecker() {
supportedLayerList.add(AllPredefinedLayers.FULLY_CONNECTED_NAME);
supportedLayerList.add(AllPredefinedLayers.CONVOLUTION_NAME);
supportedLayerList.add(AllPredefinedLayers.SOFTMAX_NAME);
supportedLayerList.add(AllPredefinedLayers.SIGMOID_NAME);
supportedLayerList.add(AllPredefinedLayers.TANH_NAME);
supportedLayerList.add(AllPredefinedLayers.RELU_NAME);
supportedLayerList.add(AllPredefinedLayers.DROPOUT_NAME);
supportedLayerList.add(AllPredefinedLayers.POOLING_NAME);
supportedLayerList.add(AllPredefinedLayers.GLOBAL_POOLING_NAME);
supportedLayerList.add(AllPredefinedLayers.LRN_NAME);
supportedLayerList.add(AllPredefinedLayers.BATCHNORM_NAME);
supportedLayerList.add(AllPredefinedLayers.SPLIT_NAME);
supportedLayerList.add(AllPredefinedLayers.GET_NAME);
supportedLayerList.add(AllPredefinedLayers.ADD_NAME);
supportedLayerList.add(AllPredefinedLayers.CONCATENATE_NAME);
supportedLayerList.add(AllPredefinedLayers.FLATTEN_NAME);
}
}
......@@ -15,25 +15,6 @@ public class LayerSupportChecker {
protected List<String> supportedLayerList = new ArrayList<>();
public LayerSupportChecker() {
supportedLayerList.add(AllPredefinedLayers.FULLY_CONNECTED_NAME);
supportedLayerList.add(AllPredefinedLayers.CONVOLUTION_NAME);
supportedLayerList.add(AllPredefinedLayers.SOFTMAX_NAME);
supportedLayerList.add(AllPredefinedLayers.SIGMOID_NAME);
supportedLayerList.add(AllPredefinedLayers.TANH_NAME);
supportedLayerList.add(AllPredefinedLayers.RELU_NAME);
supportedLayerList.add(AllPredefinedLayers.DROPOUT_NAME);
supportedLayerList.add(AllPredefinedLayers.POOLING_NAME);
supportedLayerList.add(AllPredefinedLayers.GLOBAL_POOLING_NAME);
supportedLayerList.add(AllPredefinedLayers.LRN_NAME);
supportedLayerList.add(AllPredefinedLayers.BATCHNORM_NAME);
supportedLayerList.add(AllPredefinedLayers.SPLIT_NAME);
supportedLayerList.add(AllPredefinedLayers.GET_NAME);
supportedLayerList.add(AllPredefinedLayers.ADD_NAME);
supportedLayerList.add(AllPredefinedLayers.CONCATENATE_NAME);
supportedLayerList.add(AllPredefinedLayers.FLATTEN_NAME);
}
private boolean isSupportedLayer(ArchitectureElementSymbol element){
ArchitectureElementSymbol resolvedElement = element.getResolvedThis().get();
List<ArchitectureElementSymbol> constructLayerElemList;
......
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