diff --git a/pom.xml b/pom.xml index 0a4365803b563b61a82e6224701d89130b544f1a..5bf7ba0e52de8f39f4f19a851861a7e8a5164872 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ de.monticore.lang.monticar cnnarch-gluon-generator - 0.2.8-SNAPSHOT + 0.2.9-SNAPSHOT @@ -17,7 +17,7 @@ 0.3.3-SNAPSHOT - 0.3.6-SNAPSHOT + 0.3.7-SNAPSHOT 0.0.4-SNAPSHOT 0.1.4 0.0.2-SNAPSHOT diff --git a/src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNTrain2Gluon.java b/src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNTrain2Gluon.java index 44ec4a04eb723843dc87dedb5fcd753bf82571f2..91858efe23191773e402dfc0828dd7de927a1061 100644 --- a/src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNTrain2Gluon.java +++ b/src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNTrain2Gluon.java @@ -151,7 +151,14 @@ public class CNNTrain2Gluon extends CNNTrainGenerator { // Generate Reward function if necessary if (configuration.getRlRewardFunction().isPresent()) { - generateRewardFunction(configuration.getRlRewardFunction().get(), Paths.get(rootProjectModelsDir)); + if (configuration.getTrainedArchitecture().isPresent()) { + generateRewardFunction(configuration.getTrainedArchitecture().get(), + configuration.getRlRewardFunction().get(), Paths.get(rootProjectModelsDir)); + } else { + Log.error("No architecture model for the trained neural network but is required for " + + "reinforcement learning configuration."); + } + } ftlContext.put("trainerName", trainerName); @@ -167,7 +174,8 @@ public class CNNTrain2Gluon extends CNNTrainGenerator { return fileContentMap; } - private void generateRewardFunction(RewardFunctionSymbol rewardFunctionSymbol, Path modelsDirPath) { + private void generateRewardFunction(NNArchitectureSymbol trainedArchitecture, + RewardFunctionSymbol rewardFunctionSymbol, Path modelsDirPath) { GeneratorPythonWrapperStandaloneApi pythonWrapperApi = new GeneratorPythonWrapperStandaloneApi(); List fullNameOfComponent = rewardFunctionSymbol.getRewardFunctionComponentName(); @@ -200,7 +208,7 @@ public class CNNTrain2Gluon extends CNNTrainGenerator { componentPortInformation = pythonWrapperApi.generate(emaSymbol, pythonWrapperOutputPath); } RewardFunctionParameterAdapter functionParameter = new RewardFunctionParameterAdapter(componentPortInformation); - new FunctionParameterChecker().check(functionParameter); + new FunctionParameterChecker().check(functionParameter, trainedArchitecture); rewardFunctionSymbol.setRewardFunctionParameter(functionParameter); } diff --git a/src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/reinforcement/FunctionParameterChecker.java b/src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/reinforcement/FunctionParameterChecker.java index 9e84b6cca9a14f0041f0407d3ae4a6d8c384aef3..82a1e03c695e97639a64fd1eabb9c8f35c856c86 100644 --- a/src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/reinforcement/FunctionParameterChecker.java +++ b/src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/reinforcement/FunctionParameterChecker.java @@ -1,8 +1,11 @@ /* (c) https://github.com/MontiCore/monticore */ package de.monticore.lang.monticar.cnnarch.gluongenerator.reinforcement; +import de.monticore.lang.monticar.cnntrain._symboltable.NNArchitectureSymbol; import de.se_rwth.commons.logging.Log; +import java.util.List; + /** * */ @@ -11,21 +14,42 @@ public class FunctionParameterChecker { private String inputTerminalParameterName; private String outputParameterName; private RewardFunctionParameterAdapter rewardFunctionParameter; + private NNArchitectureSymbol trainedArchitecture; public FunctionParameterChecker() { } - public void check(final RewardFunctionParameterAdapter rewardFunctionParameter) { + public void check(final RewardFunctionParameterAdapter rewardFunctionParameter, + final NNArchitectureSymbol trainedArchitecture) { + assert rewardFunctionParameter != null; + assert trainedArchitecture != null; this.rewardFunctionParameter = rewardFunctionParameter; + this.trainedArchitecture = trainedArchitecture; + retrieveParameterNames(); checkHasExactlyTwoInputs(); checkHasExactlyOneOutput(); checkHasStateAndTerminalInput(); - checkInputStateDimension(); checkInputTerminalTypeAndDimension(); + checkStateDimensionEqualsTrainedArchitectureState(); + checkInputStateDimension(); checkOutputDimension(); } + private void checkStateDimensionEqualsTrainedArchitectureState() { + failIfConditionFails(stateInputOfNNArchitectureIsEqualToRewardState(), + "State dimension of trained architecture is not equal to reward state dimensions."); + } + + private boolean stateInputOfNNArchitectureIsEqualToRewardState() { + assert trainedArchitecture.getInputs().size() == 1: "Trained architecture is not a policy network."; + final String nnStateInputName = trainedArchitecture.getInputs().get(0); + final List dimensions = trainedArchitecture.getDimensions().get(nnStateInputName); + + return rewardFunctionParameter.getInputPortDimensionOfPort(inputStateParameterName).isPresent() + && rewardFunctionParameter.getInputPortDimensionOfPort(inputStateParameterName).get().equals(dimensions); + } + private void checkHasExactlyTwoInputs() { failIfConditionFails(functionHasTwoInputs(), "Reward function must have exactly two input parameters: " + "One input needs to represents the environment's state and another input needs to be a " diff --git a/src/test/java/de/monticore/lang/monticar/cnnarch/gluongenerator/reinforcement/FunctionParameterCheckerTest.java b/src/test/java/de/monticore/lang/monticar/cnnarch/gluongenerator/reinforcement/FunctionParameterCheckerTest.java new file mode 100644 index 0000000000000000000000000000000000000000..b0ce6b9442274fd69fba10a72903d765424e97a3 --- /dev/null +++ b/src/test/java/de/monticore/lang/monticar/cnnarch/gluongenerator/reinforcement/FunctionParameterCheckerTest.java @@ -0,0 +1,215 @@ +package de.monticore.lang.monticar.cnnarch.gluongenerator.reinforcement; + +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Lists; +import de.monticore.lang.monticar.cnntrain._symboltable.NNArchitectureSymbol; +import de.monticore.lang.monticar.generator.pythonwrapper.symbolservices.data.ComponentPortInformation; +import de.monticore.lang.monticar.generator.pythonwrapper.symbolservices.data.EmadlType; +import de.monticore.lang.monticar.generator.pythonwrapper.symbolservices.data.PortDirection; +import de.monticore.lang.monticar.generator.pythonwrapper.symbolservices.data.PortVariable; +import de.se_rwth.commons.logging.Finding; +import de.se_rwth.commons.logging.Log; +import org.junit.Before; +import org.junit.Test; + +import java.util.List; +import java.util.Map; + +import static org.junit.Assert.*; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +public class FunctionParameterCheckerTest { + private static final List STATE_DIMENSIONS = Lists.newArrayList(3,2,4); + private static final PortVariable STATE_PORT = PortVariable.multidimensionalVariableFrom("input1", EmadlType.Q, + PortDirection.INPUT, STATE_DIMENSIONS); + private static final PortVariable TERMINAL_PORT = PortVariable.primitiveVariableFrom("input2", EmadlType.B, + PortDirection.INPUT); + private static final PortVariable OUTPUT_PORT = PortVariable.primitiveVariableFrom("output1", EmadlType.Q, + PortDirection.OUTPUT); + private static final String COMPONENT_NAME = "TestRewardComponent"; + + FunctionParameterChecker uut = new FunctionParameterChecker(); + + @Before + public void setup() { + Log.getFindings().clear(); + Log.enableFailQuick(false); + } + + @Test + public void validReward() { + // given + RewardFunctionParameterAdapter adapter = getValidRewardAdapter(); + + // when + uut.check(adapter, getValidTrainedArchitecture()); + List findings = Log.getFindings(); + + assertEquals(0, findings.stream().filter(Finding::isError).count()); + } + + @Test + public void invalidRewardWithOneInput() { + // given + RewardFunctionParameterAdapter adapter = getComponentWithOneInput(); + + // when + uut.check(adapter, getValidTrainedArchitecture()); + List findings = Log.getFindings(); + + assertTrue(findings.stream().anyMatch(Finding::isError)); + } + + @Test + public void invalidRewardWithTwoOutputs() { + // given + RewardFunctionParameterAdapter adapter = getComponentWithTwoOutputs(); + + // when + uut.check(adapter, getValidTrainedArchitecture()); + List findings = Log.getFindings(); + + assertTrue(findings.stream().anyMatch(Finding::isError)); + } + + @Test + public void invalidRewardWithTerminalHasQType() { + // given + RewardFunctionParameterAdapter adapter = getComponentWithTwoQInputs(); + + // when + uut.check(adapter, getValidTrainedArchitecture()); + List findings = Log.getFindings(); + + assertTrue(findings.stream().anyMatch(Finding::isError)); + } + + @Test + public void invalidRewardWithNonScalarOutput() { + // given + RewardFunctionParameterAdapter adapter = getComponentWithNonScalarOutput(); + + // when + uut.check(adapter, getValidTrainedArchitecture()); + List findings = Log.getFindings(); + + assertTrue(findings.stream().filter(Finding::isError).count() == 1); + } + + @Test + public void invalidRewardStateUnequalToTrainedArchitectureState1() { + // given + RewardFunctionParameterAdapter adapter = getValidRewardAdapter(); + NNArchitectureSymbol trainedArchitectureWithDifferenDimension = getTrainedArchitectureWithStateDimensions( + Lists.newArrayList(6)); + + // when + uut.check(adapter, trainedArchitectureWithDifferenDimension); + List findings = Log.getFindings(); + + assertTrue(findings.stream().filter(Finding::isError).count() == 1); + } + + @Test + public void invalidRewardStateUnequalToTrainedArchitectureState2() { + // given + RewardFunctionParameterAdapter adapter = getValidRewardAdapter(); + NNArchitectureSymbol trainedArchitectureWithDifferenDimension = getTrainedArchitectureWithStateDimensions( + Lists.newArrayList(3, 8)); + + // when + uut.check(adapter, trainedArchitectureWithDifferenDimension); + List findings = Log.getFindings(); + + assertTrue(findings.stream().filter(Finding::isError).count() == 1); + } + + @Test + public void invalidRewardStateUnequalToTrainedArchitectureState3() { + // given + RewardFunctionParameterAdapter adapter = getValidRewardAdapter(); + NNArchitectureSymbol trainedArchitectureWithDifferenDimension = getTrainedArchitectureWithStateDimensions( + Lists.newArrayList(2,4,3)); + + // when + uut.check(adapter, trainedArchitectureWithDifferenDimension); + List findings = Log.getFindings(); + + assertTrue(findings.stream().filter(Finding::isError).count() == 1); + } + + private RewardFunctionParameterAdapter getComponentWithNonScalarOutput() { + ComponentPortInformation componentPortInformation = new ComponentPortInformation(COMPONENT_NAME); + componentPortInformation.addAllInputs(getValidInputPortVariables()); + List outputs = Lists.newArrayList(PortVariable.multidimensionalVariableFrom( + "output", EmadlType.Q, PortDirection.OUTPUT, Lists.newArrayList(2,2))); + componentPortInformation.addAllOutputs(outputs); + return new RewardFunctionParameterAdapter(componentPortInformation); + } + + private RewardFunctionParameterAdapter getComponentWithTwoQInputs() { + ComponentPortInformation componentPortInformation + = new ComponentPortInformation(COMPONENT_NAME); + List inputs = Lists.newArrayList(STATE_PORT, + PortVariable.multidimensionalVariableFrom("input2", EmadlType.Q, PortDirection.INPUT, + Lists.newArrayList(2,3,2))); + componentPortInformation.addAllInputs(inputs); + componentPortInformation.addAllOutputs(getValidOutputPorts()); + return new RewardFunctionParameterAdapter(componentPortInformation); + } + + private RewardFunctionParameterAdapter getComponentWithTwoOutputs() { + ComponentPortInformation componentPortInformation + = new ComponentPortInformation(COMPONENT_NAME); + componentPortInformation.addAllInputs(getValidInputPortVariables()); + List outputs = getValidOutputPorts(); + outputs.add(PortVariable.primitiveVariableFrom("output2", EmadlType.B, PortDirection.OUTPUT)); + componentPortInformation.addAllOutputs(outputs); + return new RewardFunctionParameterAdapter(componentPortInformation); + } + + private RewardFunctionParameterAdapter getComponentWithOneInput() { + ComponentPortInformation componentPortInformation + = new ComponentPortInformation(COMPONENT_NAME); + componentPortInformation.addAllInputs(Lists.newArrayList(STATE_PORT)); + componentPortInformation.addAllOutputs(getValidOutputPorts()); + return new RewardFunctionParameterAdapter(componentPortInformation); + } + + private RewardFunctionParameterAdapter getValidRewardAdapter() { + ComponentPortInformation componentPortInformation + = new ComponentPortInformation(COMPONENT_NAME); + componentPortInformation.addAllInputs(getValidInputPortVariables()); + componentPortInformation.addAllOutputs(getValidOutputPorts()); + return new RewardFunctionParameterAdapter(componentPortInformation); + } + + private List getValidOutputPorts() { + return Lists.newArrayList(OUTPUT_PORT); + } + + private List getValidInputPortVariables() { + return Lists.newArrayList(STATE_PORT, TERMINAL_PORT); + } + + private NNArchitectureSymbol getValidTrainedArchitecture() { + NNArchitectureSymbol nnArchitectureSymbol = mock(NNArchitectureSymbol.class); + final String stateInputName = "stateInput"; + when(nnArchitectureSymbol.getInputs()).thenReturn(Lists.newArrayList(stateInputName)); + when(nnArchitectureSymbol.getDimensions()).thenReturn(ImmutableMap.>builder() + .put(stateInputName, STATE_DIMENSIONS) + .build()); + return nnArchitectureSymbol; + } + + private NNArchitectureSymbol getTrainedArchitectureWithStateDimensions(final List dimensions) { + NNArchitectureSymbol nnArchitectureSymbol = mock(NNArchitectureSymbol.class); + final String stateInputName = "stateInput"; + when(nnArchitectureSymbol.getInputs()).thenReturn(Lists.newArrayList(stateInputName)); + when(nnArchitectureSymbol.getDimensions()).thenReturn(ImmutableMap.>builder() + .put(stateInputName, dimensions) + .build()); + return nnArchitectureSymbol; + } +} \ No newline at end of file diff --git a/src/test/resources/target_code/CNNBufferFile.h b/src/test/resources/target_code/CNNBufferFile.h index 7908de65812f78b6ee4aa7f4d112916032a9b8dc..c0d8dd9cbe6878e07be976dda5ce9046e6c05606 100644 --- a/src/test/resources/target_code/CNNBufferFile.h +++ b/src/test/resources/target_code/CNNBufferFile.h @@ -1,4 +1,3 @@ -/* (c) https://github.com/MontiCore/monticore */ #ifndef CNNBUFFERFILE_H #define CNNBUFFERFILE_H diff --git a/src/test/resources/target_code/CNNCreator_Alexnet.py b/src/test/resources/target_code/CNNCreator_Alexnet.py index 108fe6e65e1e956ff0f5424d14d6ceb92c16bf17..9b2dc27c0a485f36a80c3e533a81d5a14a75bd51 100644 --- a/src/test/resources/target_code/CNNCreator_Alexnet.py +++ b/src/test/resources/target_code/CNNCreator_Alexnet.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import logging import os diff --git a/src/test/resources/target_code/CNNCreator_CifarClassifierNetwork.py b/src/test/resources/target_code/CNNCreator_CifarClassifierNetwork.py index d927167ec068791cd89c0545a6d2ee6a46802f2b..f84c6bd22469ad90a4147ab4ea89db40f900f5ba 100644 --- a/src/test/resources/target_code/CNNCreator_CifarClassifierNetwork.py +++ b/src/test/resources/target_code/CNNCreator_CifarClassifierNetwork.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import logging import os diff --git a/src/test/resources/target_code/CNNCreator_VGG16.py b/src/test/resources/target_code/CNNCreator_VGG16.py index 0d54de56d65f0955b4bc4fbfe7f28fb3010e9b94..5be6f054eec336010dc9183a2177590db2986bb3 100644 --- a/src/test/resources/target_code/CNNCreator_VGG16.py +++ b/src/test/resources/target_code/CNNCreator_VGG16.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import logging import os diff --git a/src/test/resources/target_code/CNNDataLoader_Alexnet.py b/src/test/resources/target_code/CNNDataLoader_Alexnet.py index 88eb5405310a76359af2e02a146c790002091101..3a4b61c07a9c78fe82987a9c851755950f8ca5b8 100644 --- a/src/test/resources/target_code/CNNDataLoader_Alexnet.py +++ b/src/test/resources/target_code/CNNDataLoader_Alexnet.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import os import h5py import mxnet as mx diff --git a/src/test/resources/target_code/CNNDataLoader_CifarClassifierNetwork.py b/src/test/resources/target_code/CNNDataLoader_CifarClassifierNetwork.py index b9c2dcf9258e1f31f78d5a787616c3f2852f98b7..c5477ed6bcdd75dc5a67334b5956657e148f75bf 100644 --- a/src/test/resources/target_code/CNNDataLoader_CifarClassifierNetwork.py +++ b/src/test/resources/target_code/CNNDataLoader_CifarClassifierNetwork.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import os import h5py import mxnet as mx diff --git a/src/test/resources/target_code/CNNDataLoader_VGG16.py b/src/test/resources/target_code/CNNDataLoader_VGG16.py index 97b80eb7ffd4612248612569fdd204cf8081f159..f14204ced80979b0c14c3286a879bc23018a25a8 100644 --- a/src/test/resources/target_code/CNNDataLoader_VGG16.py +++ b/src/test/resources/target_code/CNNDataLoader_VGG16.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import os import h5py import mxnet as mx diff --git a/src/test/resources/target_code/CNNNet_Alexnet.py b/src/test/resources/target_code/CNNNet_Alexnet.py index 243f29e73bfb220f34a751ccd76b622bbdafdfc2..a01ba0e6e11fd9b0b4f789806bc7589ca116ef90 100644 --- a/src/test/resources/target_code/CNNNet_Alexnet.py +++ b/src/test/resources/target_code/CNNNet_Alexnet.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import numpy as np from mxnet import gluon @@ -91,13 +90,14 @@ class Net_0(gluon.HybridBlock): else: self.input_normalization_data_ = NoNormalization() - self.conv1_padding = Padding(padding=(0,0,0,0,2,1,2,1)) + self.conv1_padding = Padding(padding=(0,0,-1,0,0,0,0,0)) self.conv1_ = gluon.nn.Conv2D(channels=96, kernel_size=(11,11), strides=(4,4), use_bias=True) # conv1_, output shape: {[96,55,55]} + self.pool1_padding = Padding(padding=(0,0,-1,0,0,0,0,0)) self.pool1_ = gluon.nn.MaxPool2D( pool_size=(3,3), strides=(2,2)) @@ -114,6 +114,7 @@ class Net_0(gluon.HybridBlock): use_bias=True) # conv2_1_, output shape: {[128,27,27]} + self.pool2_1_padding = Padding(padding=(0,0,-1,0,0,0,0,0)) self.pool2_1_ = gluon.nn.MaxPool2D( pool_size=(3,3), strides=(2,2)) @@ -127,6 +128,7 @@ class Net_0(gluon.HybridBlock): use_bias=True) # conv2_2_, output shape: {[128,27,27]} + self.pool2_2_padding = Padding(padding=(0,0,-1,0,0,0,0,0)) self.pool2_2_ = gluon.nn.MaxPool2D( pool_size=(3,3), strides=(2,2)) @@ -162,6 +164,7 @@ class Net_0(gluon.HybridBlock): use_bias=True) # conv5_1_, output shape: {[128,13,13]} + self.pool5_1_padding = Padding(padding=(0,0,-1,0,0,0,0,0)) self.pool5_1_ = gluon.nn.MaxPool2D( pool_size=(3,3), strides=(2,2)) @@ -183,6 +186,7 @@ class Net_0(gluon.HybridBlock): use_bias=True) # conv5_2_, output shape: {[128,13,13]} + self.pool5_2_padding = Padding(padding=(0,0,-1,0,0,0,0,0)) self.pool5_2_ = gluon.nn.MaxPool2D( pool_size=(3,3), strides=(2,2)) @@ -217,7 +221,8 @@ class Net_0(gluon.HybridBlock): beta=0.75, knorm=2, nsize=5) - pool1_ = self.pool1_(lrn1_) + pool1_padding = self.pool1_padding(lrn1_) + pool1_ = self.pool1_(pool1_padding) relu1_ = self.relu1_(pool1_) split1_ = self.split1_(relu1_) get2_1_ = split1_[0] @@ -228,7 +233,8 @@ class Net_0(gluon.HybridBlock): beta=0.75, knorm=2, nsize=5) - pool2_1_ = self.pool2_1_(lrn2_1_) + pool2_1_padding = self.pool2_1_padding(lrn2_1_) + pool2_1_ = self.pool2_1_(pool2_1_padding) relu2_1_ = self.relu2_1_(pool2_1_) get2_2_ = split1_[1] conv2_2_padding = self.conv2_2_padding(get2_2_) @@ -238,7 +244,8 @@ class Net_0(gluon.HybridBlock): beta=0.75, knorm=2, nsize=5) - pool2_2_ = self.pool2_2_(lrn2_2_) + pool2_2_padding = self.pool2_2_padding(lrn2_2_) + pool2_2_ = self.pool2_2_(pool2_2_padding) relu2_2_ = self.relu2_2_(pool2_2_) concatenate3_ = self.concatenate3_(relu2_1_, relu2_2_) conv3_padding = self.conv3_padding(concatenate3_) @@ -251,7 +258,8 @@ class Net_0(gluon.HybridBlock): relu4_1_ = self.relu4_1_(conv4_1_) conv5_1_padding = self.conv5_1_padding(relu4_1_) conv5_1_ = self.conv5_1_(conv5_1_padding) - pool5_1_ = self.pool5_1_(conv5_1_) + pool5_1_padding = self.pool5_1_padding(conv5_1_) + pool5_1_ = self.pool5_1_(pool5_1_padding) relu5_1_ = self.relu5_1_(pool5_1_) get4_2_ = split3_[1] conv4_2_padding = self.conv4_2_padding(get4_2_) @@ -259,7 +267,8 @@ class Net_0(gluon.HybridBlock): relu4_2_ = self.relu4_2_(conv4_2_) conv5_2_padding = self.conv5_2_padding(relu4_2_) conv5_2_ = self.conv5_2_(conv5_2_padding) - pool5_2_ = self.pool5_2_(conv5_2_) + pool5_2_padding = self.pool5_2_padding(conv5_2_) + pool5_2_ = self.pool5_2_(pool5_2_padding) relu5_2_ = self.relu5_2_(pool5_2_) concatenate6_ = self.concatenate6_(relu5_1_, relu5_2_) fc6_ = self.fc6_(concatenate6_) diff --git a/src/test/resources/target_code/CNNNet_CifarClassifierNetwork.py b/src/test/resources/target_code/CNNNet_CifarClassifierNetwork.py index 0cd0b9a3680f14fcfcf6901771b513499cff4415..d0f832fcc330f2d06da65d7f16ffaa5e66c6048e 100644 --- a/src/test/resources/target_code/CNNNet_CifarClassifierNetwork.py +++ b/src/test/resources/target_code/CNNNet_CifarClassifierNetwork.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import numpy as np from mxnet import gluon diff --git a/src/test/resources/target_code/CNNNet_VGG16.py b/src/test/resources/target_code/CNNNet_VGG16.py index 0db7a8acd7ff64ed6e62d6747b26c6da7d70e2b8..6d12447f1d66fc9732196a6ff539a0c7b5dce0bf 100644 --- a/src/test/resources/target_code/CNNNet_VGG16.py +++ b/src/test/resources/target_code/CNNNet_VGG16.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import numpy as np from mxnet import gluon diff --git a/src/test/resources/target_code/CNNPredictor_Alexnet.h b/src/test/resources/target_code/CNNPredictor_Alexnet.h index 6c8c1a494702f1b1e7f1504eaf3d125bec0f8534..af175fbc7b5a9d6ddab7cedfa021f337789eaa8d 100644 --- a/src/test/resources/target_code/CNNPredictor_Alexnet.h +++ b/src/test/resources/target_code/CNNPredictor_Alexnet.h @@ -1,4 +1,3 @@ -/* (c) https://github.com/MontiCore/monticore */ #ifndef CNNPREDICTOR_ALEXNET #define CNNPREDICTOR_ALEXNET diff --git a/src/test/resources/target_code/CNNPredictor_CifarClassifierNetwork.h b/src/test/resources/target_code/CNNPredictor_CifarClassifierNetwork.h index 929002f1322f8a614561ee3c5379938a1809afa1..32d6fff559927dec98396db8636c2a05d538c0c6 100644 --- a/src/test/resources/target_code/CNNPredictor_CifarClassifierNetwork.h +++ b/src/test/resources/target_code/CNNPredictor_CifarClassifierNetwork.h @@ -1,4 +1,3 @@ -/* (c) https://github.com/MontiCore/monticore */ #ifndef CNNPREDICTOR_CIFARCLASSIFIERNETWORK #define CNNPREDICTOR_CIFARCLASSIFIERNETWORK diff --git a/src/test/resources/target_code/CNNPredictor_VGG16.h b/src/test/resources/target_code/CNNPredictor_VGG16.h index bfe5aeb2225ccd2b3fe94f3ebf417172fe2a1776..47251efc19803c2d23a8699b2c1d0ad20eb72248 100644 --- a/src/test/resources/target_code/CNNPredictor_VGG16.h +++ b/src/test/resources/target_code/CNNPredictor_VGG16.h @@ -1,4 +1,3 @@ -/* (c) https://github.com/MontiCore/monticore */ #ifndef CNNPREDICTOR_VGG16 #define CNNPREDICTOR_VGG16 diff --git a/src/test/resources/target_code/CNNSupervisedTrainer_Alexnet.py b/src/test/resources/target_code/CNNSupervisedTrainer_Alexnet.py index 5b8d88e5af0191e69c096c7b1d21345db928dc6e..d3bbd66ec8aabc23db6059167fd37fe48a146815 100644 --- a/src/test/resources/target_code/CNNSupervisedTrainer_Alexnet.py +++ b/src/test/resources/target_code/CNNSupervisedTrainer_Alexnet.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import logging import numpy as np diff --git a/src/test/resources/target_code/CNNSupervisedTrainer_CifarClassifierNetwork.py b/src/test/resources/target_code/CNNSupervisedTrainer_CifarClassifierNetwork.py index 0ff367c405e6441f02f08aa6c5054df6a4d150ae..f063455836f624484e12236ad5c32108b7ee6673 100644 --- a/src/test/resources/target_code/CNNSupervisedTrainer_CifarClassifierNetwork.py +++ b/src/test/resources/target_code/CNNSupervisedTrainer_CifarClassifierNetwork.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import logging import numpy as np diff --git a/src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py b/src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py index 13b8e22c24c9093e358d7e896415ea1e2c92c7c2..57f412c2757ce9ee36d80a9ef42432fb019026c6 100644 --- a/src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py +++ b/src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import logging import numpy as np diff --git a/src/test/resources/target_code/CNNTrainer_emptyConfig.py b/src/test/resources/target_code/CNNTrainer_emptyConfig.py index 3493e7838e798c80abae9560c00bcb38d465a44c..28c2c2aab1703a3390a475461d3585bcaa8d3686 100644 --- a/src/test/resources/target_code/CNNTrainer_emptyConfig.py +++ b/src/test/resources/target_code/CNNTrainer_emptyConfig.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import logging import mxnet as mx import CNNCreator_emptyConfig diff --git a/src/test/resources/target_code/CNNTrainer_fullConfig.py b/src/test/resources/target_code/CNNTrainer_fullConfig.py index 92b55d8ef6a3458d721b0be36f1cb8719f02fa5b..efcc2a37ba05b68ae43df4b85ce8d4685d4bba85 100644 --- a/src/test/resources/target_code/CNNTrainer_fullConfig.py +++ b/src/test/resources/target_code/CNNTrainer_fullConfig.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import logging import mxnet as mx import CNNCreator_fullConfig diff --git a/src/test/resources/target_code/CNNTrainer_simpleConfig.py b/src/test/resources/target_code/CNNTrainer_simpleConfig.py index 21979b6e0f6d9ec6b7ee60ac47d6bca63f37b987..db5e0771929120911193563fa1864f69cf5cf823 100644 --- a/src/test/resources/target_code/CNNTrainer_simpleConfig.py +++ b/src/test/resources/target_code/CNNTrainer_simpleConfig.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import logging import mxnet as mx import CNNCreator_simpleConfig diff --git a/src/test/resources/target_code/ReinforcementConfig1/CNNTrainer_reinforcementConfig1.py b/src/test/resources/target_code/ReinforcementConfig1/CNNTrainer_reinforcementConfig1.py index c67132eb8c19e4ab988f369ea19cfbd5f98f9078..b5853fa853d8bf050dcac3a85f819690f13f990d 100644 --- a/src/test/resources/target_code/ReinforcementConfig1/CNNTrainer_reinforcementConfig1.py +++ b/src/test/resources/target_code/ReinforcementConfig1/CNNTrainer_reinforcementConfig1.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore from reinforcement_learning.agent import DqnAgent from reinforcement_learning.util import AgentSignalHandler from reinforcement_learning.cnnarch_logger import ArchLogger diff --git a/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/agent.py b/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/agent.py index c558a5cea3654d2688bfae261d8ccc0cf73c825d..148c89848b8d990b5f635c3976fd15e71a608893 100644 --- a/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/agent.py +++ b/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/agent.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import numpy as np import time diff --git a/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/cnnarch_logger.py b/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/cnnarch_logger.py index 03bbb48b200d74f9fd8869c495f7124230f2f3cd..4cd0c7d261745ed6bb1cb268d74e58191daed454 100644 --- a/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/cnnarch_logger.py +++ b/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/cnnarch_logger.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import logging import sys import os diff --git a/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/environment.py b/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/environment.py index bb4ca717f3db9f98917d73d1878d3e41f179ad5f..051f3c4093d51b616255ee36caa692ff92874c87 100644 --- a/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/environment.py +++ b/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/environment.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import abc import logging logging.basicConfig(level=logging.INFO) diff --git a/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/replay_memory.py b/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/replay_memory.py index 8107f0a5e20389b5b98afeda1fd5557f193fc6b9..954f2667284c29a8c443074082dddc1dcab88138 100644 --- a/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/replay_memory.py +++ b/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/replay_memory.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import numpy as np diff --git a/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/strategy.py b/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/strategy.py index eb149975d01a9e55215504deb4acc1b4f433f04d..8e4c279e5569d5b1505ee4fb9f6e9136a40c30bb 100644 --- a/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/strategy.py +++ b/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/strategy.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import numpy as np diff --git a/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/util.py b/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/util.py index 89aca7a37a4eb51247126e0fd5b07f4108c73dd7..78e7795fd290f99980c689ad1c76f274a821f830 100644 --- a/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/util.py +++ b/src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/util.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import signal import sys import numpy as np diff --git a/src/test/resources/target_code/ReinforcementConfig1/start_training.sh b/src/test/resources/target_code/ReinforcementConfig1/start_training.sh index 8193a856509ca5d60f326a460c093fe60c7e7da0..d04ec2bd6217424a17ca9e35e740683c2a05358f 100644 --- a/src/test/resources/target_code/ReinforcementConfig1/start_training.sh +++ b/src/test/resources/target_code/ReinforcementConfig1/start_training.sh @@ -1,3 +1,2 @@ #!/bin/bash -# (c) https://github.com/MontiCore/monticore -python CNNTrainer_reinforcementConfig1.py +python CNNTrainer_reinforcementConfig1.py \ No newline at end of file diff --git a/src/test/resources/target_code/ReinforcementConfig2/CNNTrainer_reinforcementConfig2.py b/src/test/resources/target_code/ReinforcementConfig2/CNNTrainer_reinforcementConfig2.py index 1e89a1b2a4ee6ba4ad98088535e22997c7fcdbce..d7c3cc96ead612b22b702a88975643285d2ceb55 100644 --- a/src/test/resources/target_code/ReinforcementConfig2/CNNTrainer_reinforcementConfig2.py +++ b/src/test/resources/target_code/ReinforcementConfig2/CNNTrainer_reinforcementConfig2.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore from reinforcement_learning.agent import DqnAgent from reinforcement_learning.util import AgentSignalHandler from reinforcement_learning.cnnarch_logger import ArchLogger diff --git a/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/agent.py b/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/agent.py index c558a5cea3654d2688bfae261d8ccc0cf73c825d..148c89848b8d990b5f635c3976fd15e71a608893 100644 --- a/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/agent.py +++ b/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/agent.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import numpy as np import time diff --git a/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/cnnarch_logger.py b/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/cnnarch_logger.py index 03bbb48b200d74f9fd8869c495f7124230f2f3cd..4cd0c7d261745ed6bb1cb268d74e58191daed454 100644 --- a/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/cnnarch_logger.py +++ b/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/cnnarch_logger.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import logging import sys import os diff --git a/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/environment.py b/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/environment.py index f6a0ba3d8a3144a332eb6f25f37cf008d4f63ba7..381ec9eae2383af1d97fff93d0628ca945dc58e6 100644 --- a/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/environment.py +++ b/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/environment.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import abc import logging logging.basicConfig(level=logging.INFO) diff --git a/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/replay_memory.py b/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/replay_memory.py index 8107f0a5e20389b5b98afeda1fd5557f193fc6b9..954f2667284c29a8c443074082dddc1dcab88138 100644 --- a/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/replay_memory.py +++ b/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/replay_memory.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import numpy as np diff --git a/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/strategy.py b/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/strategy.py index 20591b77ae5353b3014460152d1d608c9324623b..d2d2386658c56c5ebb6d654468669a2664622305 100644 --- a/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/strategy.py +++ b/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/strategy.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import numpy as np diff --git a/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/util.py b/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/util.py index b09ef63ccdbe2812c342619e985baa2bccff8ce8..1d8b38c4a32a1cc6c0e364054e746e9115d7d05b 100644 --- a/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/util.py +++ b/src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/util.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import signal import sys import numpy as np diff --git a/src/test/resources/target_code/ReinforcementConfig2/start_training.sh b/src/test/resources/target_code/ReinforcementConfig2/start_training.sh index 446cd1f1795013301b6b8466ab5872ad6d5609e0..5f1944d82bfb2ef23a6de02788f8d582bbec896d 100644 --- a/src/test/resources/target_code/ReinforcementConfig2/start_training.sh +++ b/src/test/resources/target_code/ReinforcementConfig2/start_training.sh @@ -1,3 +1,2 @@ #!/bin/bash -# (c) https://github.com/MontiCore/monticore python CNNTrainer_reinforcementConfig2.py diff --git a/src/test/resources/target_code/ReinforcementConfig3/CNNTrainer_reinforcementConfig3.py b/src/test/resources/target_code/ReinforcementConfig3/CNNTrainer_reinforcementConfig3.py index 945862259bb53cc23ebdca9593c319b9057d86a3..6af8211440e03e79ea95cad97bd21eb00a8718ac 100644 --- a/src/test/resources/target_code/ReinforcementConfig3/CNNTrainer_reinforcementConfig3.py +++ b/src/test/resources/target_code/ReinforcementConfig3/CNNTrainer_reinforcementConfig3.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore from reinforcement_learning.agent import DqnAgent from reinforcement_learning.util import AgentSignalHandler from reinforcement_learning.cnnarch_logger import ArchLogger diff --git a/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/agent.py b/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/agent.py index c558a5cea3654d2688bfae261d8ccc0cf73c825d..148c89848b8d990b5f635c3976fd15e71a608893 100644 --- a/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/agent.py +++ b/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/agent.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import numpy as np import time diff --git a/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/cnnarch_logger.py b/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/cnnarch_logger.py index 03bbb48b200d74f9fd8869c495f7124230f2f3cd..4cd0c7d261745ed6bb1cb268d74e58191daed454 100644 --- a/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/cnnarch_logger.py +++ b/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/cnnarch_logger.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import logging import sys import os diff --git a/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/environment.py b/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/environment.py index 3cc0ed880fb640af262200e12f49de1ae0de0bb2..1cdbcf6c69e2b86103166f1d55420c60381a3c47 100644 --- a/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/environment.py +++ b/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/environment.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import abc import logging logging.basicConfig(level=logging.INFO) diff --git a/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/replay_memory.py b/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/replay_memory.py index 8107f0a5e20389b5b98afeda1fd5557f193fc6b9..954f2667284c29a8c443074082dddc1dcab88138 100644 --- a/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/replay_memory.py +++ b/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/replay_memory.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import numpy as np diff --git a/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/strategy.py b/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/strategy.py index 20591b77ae5353b3014460152d1d608c9324623b..d2d2386658c56c5ebb6d654468669a2664622305 100644 --- a/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/strategy.py +++ b/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/strategy.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import numpy as np diff --git a/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/util.py b/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/util.py index b09ef63ccdbe2812c342619e985baa2bccff8ce8..1d8b38c4a32a1cc6c0e364054e746e9115d7d05b 100644 --- a/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/util.py +++ b/src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/util.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import signal import sys import numpy as np diff --git a/src/test/resources/target_code/ReinforcementConfig3/start_training.sh b/src/test/resources/target_code/ReinforcementConfig3/start_training.sh index 5d98d367298fb22bd54c89d711f9e8769059ab82..84a67d1afa3608e622737cae051db02cc3af4e02 100644 --- a/src/test/resources/target_code/ReinforcementConfig3/start_training.sh +++ b/src/test/resources/target_code/ReinforcementConfig3/start_training.sh @@ -1,3 +1,2 @@ #!/bin/bash -# (c) https://github.com/MontiCore/monticore python CNNTrainer_reinforcementConfig3.py diff --git a/src/test/resources/target_code/cmake/FindArmadillo.cmake b/src/test/resources/target_code/cmake/FindArmadillo.cmake index 10a9b6264cd380a65e8e771e4a42983bd47ccb27..a2b17fa2ddca28a506f86d7fe6686a94309788b8 100644 --- a/src/test/resources/target_code/cmake/FindArmadillo.cmake +++ b/src/test/resources/target_code/cmake/FindArmadillo.cmake @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore # Automatically generated file # # - Try to find Armadillo diff --git a/src/test/resources/target_code/ddpg/CNNTrainer_actorNetwork.py b/src/test/resources/target_code/ddpg/CNNTrainer_actorNetwork.py index 180ee7d087fe170fb4ccd05a835f1b012ce2e4a6..b09af8edee0582e4e5e19ae80621e0bbec87cd4c 100644 --- a/src/test/resources/target_code/ddpg/CNNTrainer_actorNetwork.py +++ b/src/test/resources/target_code/ddpg/CNNTrainer_actorNetwork.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore from reinforcement_learning.agent import DdpgAgent from reinforcement_learning.util import AgentSignalHandler from reinforcement_learning.cnnarch_logger import ArchLogger diff --git a/src/test/resources/target_code/ddpg/reinforcement_learning/CNNCreator_CriticNetwork.py b/src/test/resources/target_code/ddpg/reinforcement_learning/CNNCreator_CriticNetwork.py index 4caa1279a1cd5119a313042029adffe1fac34af4..17e009473b6f2464d633ab7eb728b23cc770a4f5 100644 --- a/src/test/resources/target_code/ddpg/reinforcement_learning/CNNCreator_CriticNetwork.py +++ b/src/test/resources/target_code/ddpg/reinforcement_learning/CNNCreator_CriticNetwork.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import logging import os diff --git a/src/test/resources/target_code/ddpg/reinforcement_learning/CNNNet_CriticNetwork.py b/src/test/resources/target_code/ddpg/reinforcement_learning/CNNNet_CriticNetwork.py index 4e46dce607f3dfb9f9d26dec24664fc525d5e701..e7f610fac9f7816fcf8790bcb1d516b9c63ad614 100644 --- a/src/test/resources/target_code/ddpg/reinforcement_learning/CNNNet_CriticNetwork.py +++ b/src/test/resources/target_code/ddpg/reinforcement_learning/CNNNet_CriticNetwork.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import numpy as np from mxnet import gluon diff --git a/src/test/resources/target_code/ddpg/reinforcement_learning/agent.py b/src/test/resources/target_code/ddpg/reinforcement_learning/agent.py index c558a5cea3654d2688bfae261d8ccc0cf73c825d..148c89848b8d990b5f635c3976fd15e71a608893 100644 --- a/src/test/resources/target_code/ddpg/reinforcement_learning/agent.py +++ b/src/test/resources/target_code/ddpg/reinforcement_learning/agent.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import numpy as np import time diff --git a/src/test/resources/target_code/ddpg/reinforcement_learning/cnnarch_logger.py b/src/test/resources/target_code/ddpg/reinforcement_learning/cnnarch_logger.py index 03bbb48b200d74f9fd8869c495f7124230f2f3cd..4cd0c7d261745ed6bb1cb268d74e58191daed454 100644 --- a/src/test/resources/target_code/ddpg/reinforcement_learning/cnnarch_logger.py +++ b/src/test/resources/target_code/ddpg/reinforcement_learning/cnnarch_logger.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import logging import sys import os diff --git a/src/test/resources/target_code/ddpg/reinforcement_learning/environment.py b/src/test/resources/target_code/ddpg/reinforcement_learning/environment.py index f6a0ba3d8a3144a332eb6f25f37cf008d4f63ba7..381ec9eae2383af1d97fff93d0628ca945dc58e6 100644 --- a/src/test/resources/target_code/ddpg/reinforcement_learning/environment.py +++ b/src/test/resources/target_code/ddpg/reinforcement_learning/environment.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import abc import logging logging.basicConfig(level=logging.INFO) diff --git a/src/test/resources/target_code/ddpg/reinforcement_learning/replay_memory.py b/src/test/resources/target_code/ddpg/reinforcement_learning/replay_memory.py index 8107f0a5e20389b5b98afeda1fd5557f193fc6b9..954f2667284c29a8c443074082dddc1dcab88138 100644 --- a/src/test/resources/target_code/ddpg/reinforcement_learning/replay_memory.py +++ b/src/test/resources/target_code/ddpg/reinforcement_learning/replay_memory.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import numpy as np diff --git a/src/test/resources/target_code/ddpg/reinforcement_learning/strategy.py b/src/test/resources/target_code/ddpg/reinforcement_learning/strategy.py index 20591b77ae5353b3014460152d1d608c9324623b..d2d2386658c56c5ebb6d654468669a2664622305 100644 --- a/src/test/resources/target_code/ddpg/reinforcement_learning/strategy.py +++ b/src/test/resources/target_code/ddpg/reinforcement_learning/strategy.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import numpy as np diff --git a/src/test/resources/target_code/ddpg/reinforcement_learning/util.py b/src/test/resources/target_code/ddpg/reinforcement_learning/util.py index b09ef63ccdbe2812c342619e985baa2bccff8ce8..1d8b38c4a32a1cc6c0e364054e746e9115d7d05b 100644 --- a/src/test/resources/target_code/ddpg/reinforcement_learning/util.py +++ b/src/test/resources/target_code/ddpg/reinforcement_learning/util.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import signal import sys import numpy as np diff --git a/src/test/resources/target_code/ddpg/start_training.sh b/src/test/resources/target_code/ddpg/start_training.sh index 916be742af4296cb1c92b921ca08de81715e5688..699ab073a21c030c111ceb0af25b642ff27c217f 100644 --- a/src/test/resources/target_code/ddpg/start_training.sh +++ b/src/test/resources/target_code/ddpg/start_training.sh @@ -1,3 +1,2 @@ #!/bin/bash -# (c) https://github.com/MontiCore/monticore python CNNTrainer_actorNetwork.py diff --git a/src/test/resources/target_code/reinforcement_learning/agent.py b/src/test/resources/target_code/reinforcement_learning/agent.py index c558a5cea3654d2688bfae261d8ccc0cf73c825d..148c89848b8d990b5f635c3976fd15e71a608893 100644 --- a/src/test/resources/target_code/reinforcement_learning/agent.py +++ b/src/test/resources/target_code/reinforcement_learning/agent.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import numpy as np import time diff --git a/src/test/resources/target_code/reinforcement_learning/environment.py b/src/test/resources/target_code/reinforcement_learning/environment.py index 141d76374bbd027b57518cbea5f2ae46f4adc198..5d9a342f2cef88b184b2c4bb4976c7987f5cc1bf 100644 --- a/src/test/resources/target_code/reinforcement_learning/environment.py +++ b/src/test/resources/target_code/reinforcement_learning/environment.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import abc import logging logging.basicConfig(level=logging.INFO) diff --git a/src/test/resources/target_code/reinforcement_learning/replay_memory.py b/src/test/resources/target_code/reinforcement_learning/replay_memory.py index 419ffc762101ff3d29002d7ed0413896e4ef6331..274c5ad933c00146c144c851198ca7da5c571813 100644 --- a/src/test/resources/target_code/reinforcement_learning/replay_memory.py +++ b/src/test/resources/target_code/reinforcement_learning/replay_memory.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import numpy as np class ReplayMemoryBuilder(object): diff --git a/src/test/resources/target_code/reinforcement_learning/strategy.py b/src/test/resources/target_code/reinforcement_learning/strategy.py index d38e908b24e7a23765f949675cc94a8729c0a856..ee4549dc8c8a779b708859404b35b13b711833e2 100644 --- a/src/test/resources/target_code/reinforcement_learning/strategy.py +++ b/src/test/resources/target_code/reinforcement_learning/strategy.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import numpy as np diff --git a/src/test/resources/target_code/reinforcement_learning/util.py b/src/test/resources/target_code/reinforcement_learning/util.py index 124874595091c62c59ca67dae6ea24586155c577..af0f64aec9e9279cbd013ce321a7052175748c27 100644 --- a/src/test/resources/target_code/reinforcement_learning/util.py +++ b/src/test/resources/target_code/reinforcement_learning/util.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import signal import sys import numpy as np diff --git a/src/test/resources/target_code/ros-ddpg/CNNTrainer_rosActorNetwork.py b/src/test/resources/target_code/ros-ddpg/CNNTrainer_rosActorNetwork.py index 26e81b672109c3036d65847995628566a0a410a9..261623f4fe95398dc34984e6560596ded0fcc04a 100644 --- a/src/test/resources/target_code/ros-ddpg/CNNTrainer_rosActorNetwork.py +++ b/src/test/resources/target_code/ros-ddpg/CNNTrainer_rosActorNetwork.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore from reinforcement_learning.agent import DdpgAgent from reinforcement_learning.util import AgentSignalHandler from reinforcement_learning.cnnarch_logger import ArchLogger diff --git a/src/test/resources/target_code/ros-ddpg/reinforcement_learning/CNNCreator_RosCriticNetwork.py b/src/test/resources/target_code/ros-ddpg/reinforcement_learning/CNNCreator_RosCriticNetwork.py index 32ab28f3bab07a0c78388cc9e66b358ece60b88f..aaa2382a140aeecf2fd90a6261dc668934b0e490 100644 --- a/src/test/resources/target_code/ros-ddpg/reinforcement_learning/CNNCreator_RosCriticNetwork.py +++ b/src/test/resources/target_code/ros-ddpg/reinforcement_learning/CNNCreator_RosCriticNetwork.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import logging import os diff --git a/src/test/resources/target_code/ros-ddpg/reinforcement_learning/CNNNet_RosCriticNetwork.py b/src/test/resources/target_code/ros-ddpg/reinforcement_learning/CNNNet_RosCriticNetwork.py index 4e46dce607f3dfb9f9d26dec24664fc525d5e701..e7f610fac9f7816fcf8790bcb1d516b9c63ad614 100644 --- a/src/test/resources/target_code/ros-ddpg/reinforcement_learning/CNNNet_RosCriticNetwork.py +++ b/src/test/resources/target_code/ros-ddpg/reinforcement_learning/CNNNet_RosCriticNetwork.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import numpy as np from mxnet import gluon diff --git a/src/test/resources/target_code/ros-ddpg/reinforcement_learning/agent.py b/src/test/resources/target_code/ros-ddpg/reinforcement_learning/agent.py index c558a5cea3654d2688bfae261d8ccc0cf73c825d..148c89848b8d990b5f635c3976fd15e71a608893 100644 --- a/src/test/resources/target_code/ros-ddpg/reinforcement_learning/agent.py +++ b/src/test/resources/target_code/ros-ddpg/reinforcement_learning/agent.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import numpy as np import time diff --git a/src/test/resources/target_code/ros-ddpg/reinforcement_learning/cnnarch_logger.py b/src/test/resources/target_code/ros-ddpg/reinforcement_learning/cnnarch_logger.py index 03bbb48b200d74f9fd8869c495f7124230f2f3cd..4cd0c7d261745ed6bb1cb268d74e58191daed454 100644 --- a/src/test/resources/target_code/ros-ddpg/reinforcement_learning/cnnarch_logger.py +++ b/src/test/resources/target_code/ros-ddpg/reinforcement_learning/cnnarch_logger.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import logging import sys import os diff --git a/src/test/resources/target_code/ros-ddpg/reinforcement_learning/environment.py b/src/test/resources/target_code/ros-ddpg/reinforcement_learning/environment.py index b8c5b16743def9359a83e5cc44682019331717fa..aef81280dd430a1de63cbd7064e8190800495697 100644 --- a/src/test/resources/target_code/ros-ddpg/reinforcement_learning/environment.py +++ b/src/test/resources/target_code/ros-ddpg/reinforcement_learning/environment.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import abc import logging logging.basicConfig(level=logging.INFO) diff --git a/src/test/resources/target_code/ros-ddpg/reinforcement_learning/replay_memory.py b/src/test/resources/target_code/ros-ddpg/reinforcement_learning/replay_memory.py index 8107f0a5e20389b5b98afeda1fd5557f193fc6b9..954f2667284c29a8c443074082dddc1dcab88138 100644 --- a/src/test/resources/target_code/ros-ddpg/reinforcement_learning/replay_memory.py +++ b/src/test/resources/target_code/ros-ddpg/reinforcement_learning/replay_memory.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import numpy as np diff --git a/src/test/resources/target_code/ros-ddpg/reinforcement_learning/strategy.py b/src/test/resources/target_code/ros-ddpg/reinforcement_learning/strategy.py index 20591b77ae5353b3014460152d1d608c9324623b..d2d2386658c56c5ebb6d654468669a2664622305 100644 --- a/src/test/resources/target_code/ros-ddpg/reinforcement_learning/strategy.py +++ b/src/test/resources/target_code/ros-ddpg/reinforcement_learning/strategy.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import numpy as np diff --git a/src/test/resources/target_code/ros-ddpg/reinforcement_learning/util.py b/src/test/resources/target_code/ros-ddpg/reinforcement_learning/util.py index b09ef63ccdbe2812c342619e985baa2bccff8ce8..1d8b38c4a32a1cc6c0e364054e746e9115d7d05b 100644 --- a/src/test/resources/target_code/ros-ddpg/reinforcement_learning/util.py +++ b/src/test/resources/target_code/ros-ddpg/reinforcement_learning/util.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import signal import sys import numpy as np diff --git a/src/test/resources/target_code/ros-ddpg/start_training.sh b/src/test/resources/target_code/ros-ddpg/start_training.sh index f945440f7cb57318d6e27ce6141f276f60c4a819..d14e30caec8c93e363d2848261332adfee1eae1e 100644 --- a/src/test/resources/target_code/ros-ddpg/start_training.sh +++ b/src/test/resources/target_code/ros-ddpg/start_training.sh @@ -1,3 +1,2 @@ #!/bin/bash -# (c) https://github.com/MontiCore/monticore python CNNTrainer_rosActorNetwork.py diff --git a/src/test/resources/target_code/td3/CNNTrainer_tD3Config.py b/src/test/resources/target_code/td3/CNNTrainer_tD3Config.py index c92a1fccbbbcc5cb7b1d52daf5da26a40b6a63a1..4b184a417c139d97b7e6e867b52647ba872a0d3d 100644 --- a/src/test/resources/target_code/td3/CNNTrainer_tD3Config.py +++ b/src/test/resources/target_code/td3/CNNTrainer_tD3Config.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore from reinforcement_learning.agent import TwinDelayedDdpgAgent from reinforcement_learning.util import AgentSignalHandler from reinforcement_learning.cnnarch_logger import ArchLogger diff --git a/src/test/resources/target_code/td3/reinforcement_learning/CNNCreator_CriticNetwork.py b/src/test/resources/target_code/td3/reinforcement_learning/CNNCreator_CriticNetwork.py index 4caa1279a1cd5119a313042029adffe1fac34af4..17e009473b6f2464d633ab7eb728b23cc770a4f5 100644 --- a/src/test/resources/target_code/td3/reinforcement_learning/CNNCreator_CriticNetwork.py +++ b/src/test/resources/target_code/td3/reinforcement_learning/CNNCreator_CriticNetwork.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import logging import os diff --git a/src/test/resources/target_code/td3/reinforcement_learning/CNNNet_CriticNetwork.py b/src/test/resources/target_code/td3/reinforcement_learning/CNNNet_CriticNetwork.py index 4e46dce607f3dfb9f9d26dec24664fc525d5e701..e7f610fac9f7816fcf8790bcb1d516b9c63ad614 100644 --- a/src/test/resources/target_code/td3/reinforcement_learning/CNNNet_CriticNetwork.py +++ b/src/test/resources/target_code/td3/reinforcement_learning/CNNNet_CriticNetwork.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import numpy as np from mxnet import gluon diff --git a/src/test/resources/target_code/td3/reinforcement_learning/agent.py b/src/test/resources/target_code/td3/reinforcement_learning/agent.py index c558a5cea3654d2688bfae261d8ccc0cf73c825d..148c89848b8d990b5f635c3976fd15e71a608893 100644 --- a/src/test/resources/target_code/td3/reinforcement_learning/agent.py +++ b/src/test/resources/target_code/td3/reinforcement_learning/agent.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import mxnet as mx import numpy as np import time diff --git a/src/test/resources/target_code/td3/reinforcement_learning/cnnarch_logger.py b/src/test/resources/target_code/td3/reinforcement_learning/cnnarch_logger.py index 03bbb48b200d74f9fd8869c495f7124230f2f3cd..4cd0c7d261745ed6bb1cb268d74e58191daed454 100644 --- a/src/test/resources/target_code/td3/reinforcement_learning/cnnarch_logger.py +++ b/src/test/resources/target_code/td3/reinforcement_learning/cnnarch_logger.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import logging import sys import os diff --git a/src/test/resources/target_code/td3/reinforcement_learning/environment.py b/src/test/resources/target_code/td3/reinforcement_learning/environment.py index f6a0ba3d8a3144a332eb6f25f37cf008d4f63ba7..381ec9eae2383af1d97fff93d0628ca945dc58e6 100644 --- a/src/test/resources/target_code/td3/reinforcement_learning/environment.py +++ b/src/test/resources/target_code/td3/reinforcement_learning/environment.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import abc import logging logging.basicConfig(level=logging.INFO) diff --git a/src/test/resources/target_code/td3/reinforcement_learning/replay_memory.py b/src/test/resources/target_code/td3/reinforcement_learning/replay_memory.py index 8107f0a5e20389b5b98afeda1fd5557f193fc6b9..954f2667284c29a8c443074082dddc1dcab88138 100644 --- a/src/test/resources/target_code/td3/reinforcement_learning/replay_memory.py +++ b/src/test/resources/target_code/td3/reinforcement_learning/replay_memory.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import numpy as np diff --git a/src/test/resources/target_code/td3/reinforcement_learning/strategy.py b/src/test/resources/target_code/td3/reinforcement_learning/strategy.py index 20591b77ae5353b3014460152d1d608c9324623b..d2d2386658c56c5ebb6d654468669a2664622305 100644 --- a/src/test/resources/target_code/td3/reinforcement_learning/strategy.py +++ b/src/test/resources/target_code/td3/reinforcement_learning/strategy.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import numpy as np diff --git a/src/test/resources/target_code/td3/reinforcement_learning/util.py b/src/test/resources/target_code/td3/reinforcement_learning/util.py index b09ef63ccdbe2812c342619e985baa2bccff8ce8..1d8b38c4a32a1cc6c0e364054e746e9115d7d05b 100644 --- a/src/test/resources/target_code/td3/reinforcement_learning/util.py +++ b/src/test/resources/target_code/td3/reinforcement_learning/util.py @@ -1,4 +1,3 @@ -# (c) https://github.com/MontiCore/monticore import signal import sys import numpy as np diff --git a/src/test/resources/target_code/td3/start_training.sh b/src/test/resources/target_code/td3/start_training.sh index 7f2aefa7350e54535c7c5937867d1765684dc8ad..92d00e7e41cf0e7aec89a197bd5fef61997d7ef5 100644 --- a/src/test/resources/target_code/td3/start_training.sh +++ b/src/test/resources/target_code/td3/start_training.sh @@ -1,3 +1,2 @@ #!/bin/bash -# (c) https://github.com/MontiCore/monticore python CNNTrainer_tD3Config.py