Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
CNNArch2Gluon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
monticore
EmbeddedMontiArc
generators
CNNArch2Gluon
Commits
153ba019
Commit
153ba019
authored
Aug 23, 2019
by
Bernhard Rumpe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BR-sy
parent
e3e00e7d
Pipeline
#175142
failed with stages
in 48 seconds
Changes
191
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
191 changed files
with
293 additions
and
224 deletions
+293
-224
.circleci/config.yml
.circleci/config.yml
+1
-0
.gitlab-ci.yml
.gitlab-ci.yml
+1
-0
.idea/vcs.xml
.idea/vcs.xml
+2
-1
.travis.yml
.travis.yml
+1
-0
README.md
README.md
+2
-1
pom.xml
pom.xml
+1
-0
settings.xml
settings.xml
+1
-0
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNArch2Gluon.java
...e/lang/monticar/cnnarch/gluongenerator/CNNArch2Gluon.java
+2
-21
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNArch2GluonArchitectureSupportChecker.java
...uongenerator/CNNArch2GluonArchitectureSupportChecker.java
+1
-0
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNArch2GluonCli.java
...ang/monticar/cnnarch/gluongenerator/CNNArch2GluonCli.java
+2
-21
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNArch2GluonLayerSupportChecker.java
...arch/gluongenerator/CNNArch2GluonLayerSupportChecker.java
+1
-0
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNArch2GluonTemplateController.java
...narch/gluongenerator/CNNArch2GluonTemplateController.java
+1
-20
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNArch2GluonTrainParamSupportChecker.java
...gluongenerator/CNNArch2GluonTrainParamSupportChecker.java
+2
-21
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNTrain2Gluon.java
.../lang/monticar/cnnarch/gluongenerator/CNNTrain2Gluon.java
+2
-1
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/GluonConfigurationData.java
...nticar/cnnarch/gluongenerator/GluonConfigurationData.java
+1
-0
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/GluonTemplateConfiguration.java
...ar/cnnarch/gluongenerator/GluonTemplateConfiguration.java
+1
-0
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/NetDefinitionMode.java
...ng/monticar/cnnarch/gluongenerator/NetDefinitionMode.java
+1
-0
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/annotations/ArchitectureAdapter.java
...narch/gluongenerator/annotations/ArchitectureAdapter.java
+2
-1
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/reinforcement/FunctionParameterChecker.java
...luongenerator/reinforcement/FunctionParameterChecker.java
+2
-1
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/reinforcement/RewardFunctionParameterAdapter.java
...nerator/reinforcement/RewardFunctionParameterAdapter.java
+2
-1
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/reinforcement/RewardFunctionSourceGenerator.java
...enerator/reinforcement/RewardFunctionSourceGenerator.java
+2
-1
src/main/resources/templates/gluon/CNNBufferFile.ftl
src/main/resources/templates/gluon/CNNBufferFile.ftl
+1
-0
src/main/resources/templates/gluon/CNNCreator.ftl
src/main/resources/templates/gluon/CNNCreator.ftl
+1
-0
src/main/resources/templates/gluon/CNNDataLoader.ftl
src/main/resources/templates/gluon/CNNDataLoader.ftl
+2
-1
src/main/resources/templates/gluon/CNNNet.ftl
src/main/resources/templates/gluon/CNNNet.ftl
+2
-1
src/main/resources/templates/gluon/CNNPredictor.ftl
src/main/resources/templates/gluon/CNNPredictor.ftl
+1
-0
src/main/resources/templates/gluon/CNNSupervisedTrainer.ftl
src/main/resources/templates/gluon/CNNSupervisedTrainer.ftl
+2
-1
src/main/resources/templates/gluon/CNNTrainer.ftl
src/main/resources/templates/gluon/CNNTrainer.ftl
+2
-1
src/main/resources/templates/gluon/elements/Add.ftl
src/main/resources/templates/gluon/elements/Add.ftl
+2
-1
src/main/resources/templates/gluon/elements/BatchNorm.ftl
src/main/resources/templates/gluon/elements/BatchNorm.ftl
+2
-1
src/main/resources/templates/gluon/elements/Concatenate.ftl
src/main/resources/templates/gluon/elements/Concatenate.ftl
+2
-1
src/main/resources/templates/gluon/elements/Const.ftl
src/main/resources/templates/gluon/elements/Const.ftl
+2
-1
src/main/resources/templates/gluon/elements/Convolution.ftl
src/main/resources/templates/gluon/elements/Convolution.ftl
+2
-1
src/main/resources/templates/gluon/elements/Dropout.ftl
src/main/resources/templates/gluon/elements/Dropout.ftl
+2
-1
src/main/resources/templates/gluon/elements/Embedding.ftl
src/main/resources/templates/gluon/elements/Embedding.ftl
+2
-1
src/main/resources/templates/gluon/elements/Flatten.ftl
src/main/resources/templates/gluon/elements/Flatten.ftl
+2
-1
src/main/resources/templates/gluon/elements/FullyConnected.ftl
...ain/resources/templates/gluon/elements/FullyConnected.ftl
+2
-1
src/main/resources/templates/gluon/elements/GRU.ftl
src/main/resources/templates/gluon/elements/GRU.ftl
+2
-1
src/main/resources/templates/gluon/elements/Get.ftl
src/main/resources/templates/gluon/elements/Get.ftl
+2
-1
src/main/resources/templates/gluon/elements/GlobalPooling.ftl
...main/resources/templates/gluon/elements/GlobalPooling.ftl
+2
-1
src/main/resources/templates/gluon/elements/Input.ftl
src/main/resources/templates/gluon/elements/Input.ftl
+2
-1
src/main/resources/templates/gluon/elements/LSTM.ftl
src/main/resources/templates/gluon/elements/LSTM.ftl
+2
-1
src/main/resources/templates/gluon/elements/Lrn.ftl
src/main/resources/templates/gluon/elements/Lrn.ftl
+2
-1
src/main/resources/templates/gluon/elements/OneHot.ftl
src/main/resources/templates/gluon/elements/OneHot.ftl
+2
-1
src/main/resources/templates/gluon/elements/Output.ftl
src/main/resources/templates/gluon/elements/Output.ftl
+2
-1
src/main/resources/templates/gluon/elements/OutputShape.ftl
src/main/resources/templates/gluon/elements/OutputShape.ftl
+1
-0
src/main/resources/templates/gluon/elements/Pooling.ftl
src/main/resources/templates/gluon/elements/Pooling.ftl
+2
-1
src/main/resources/templates/gluon/elements/RNN.ftl
src/main/resources/templates/gluon/elements/RNN.ftl
+2
-1
src/main/resources/templates/gluon/elements/Relu.ftl
src/main/resources/templates/gluon/elements/Relu.ftl
+2
-1
src/main/resources/templates/gluon/elements/Sigmoid.ftl
src/main/resources/templates/gluon/elements/Sigmoid.ftl
+2
-1
src/main/resources/templates/gluon/elements/Softmax.ftl
src/main/resources/templates/gluon/elements/Softmax.ftl
+1
-0
src/main/resources/templates/gluon/elements/Split.ftl
src/main/resources/templates/gluon/elements/Split.ftl
+2
-1
src/main/resources/templates/gluon/elements/Tanh.ftl
src/main/resources/templates/gluon/elements/Tanh.ftl
+2
-1
src/main/resources/templates/gluon/execute.ftl
src/main/resources/templates/gluon/execute.ftl
+1
-0
src/main/resources/templates/gluon/pythonExecute.ftl
src/main/resources/templates/gluon/pythonExecute.ftl
+2
-1
src/main/resources/templates/gluon/reinforcement/StartTrainer.ftl
.../resources/templates/gluon/reinforcement/StartTrainer.ftl
+2
-1
src/main/resources/templates/gluon/reinforcement/Trainer.ftl
src/main/resources/templates/gluon/reinforcement/Trainer.ftl
+2
-1
src/main/resources/templates/gluon/reinforcement/agent/ActionPolicy.ftl
...rces/templates/gluon/reinforcement/agent/ActionPolicy.ftl
+2
-1
src/main/resources/templates/gluon/reinforcement/agent/Agent.ftl
...n/resources/templates/gluon/reinforcement/agent/Agent.ftl
+1
-0
src/main/resources/templates/gluon/reinforcement/agent/ReplayMemory.ftl
...rces/templates/gluon/reinforcement/agent/ReplayMemory.ftl
+2
-1
src/main/resources/templates/gluon/reinforcement/agent/Strategy.ftl
...esources/templates/gluon/reinforcement/agent/Strategy.ftl
+1
-0
src/main/resources/templates/gluon/reinforcement/environment/Environment.ftl
...templates/gluon/reinforcement/environment/Environment.ftl
+1
-0
src/main/resources/templates/gluon/reinforcement/params/DdpgAgentParams.ftl
.../templates/gluon/reinforcement/params/DdpgAgentParams.ftl
+1
-0
src/main/resources/templates/gluon/reinforcement/params/DqnAgentParams.ftl
...s/templates/gluon/reinforcement/params/DqnAgentParams.ftl
+1
-0
src/main/resources/templates/gluon/reinforcement/params/ReplayMemoryParams.ftl
...mplates/gluon/reinforcement/params/ReplayMemoryParams.ftl
+1
-0
src/main/resources/templates/gluon/reinforcement/params/StrategyParams.ftl
...s/templates/gluon/reinforcement/params/StrategyParams.ftl
+1
-0
src/main/resources/templates/gluon/reinforcement/params/Td3AgentParams.ftl
...s/templates/gluon/reinforcement/params/Td3AgentParams.ftl
+2
-1
src/main/resources/templates/gluon/reinforcement/util/Logger.ftl
...n/resources/templates/gluon/reinforcement/util/Logger.ftl
+2
-1
src/main/resources/templates/gluon/reinforcement/util/Util.ftl
...ain/resources/templates/gluon/reinforcement/util/Util.ftl
+1
-0
src/test/java/de/monticore/lang/monticar/cnnarch/gluongenerator/AbstractSymtabTest.java
...g/monticar/cnnarch/gluongenerator/AbstractSymtabTest.java
+1
-20
src/test/java/de/monticore/lang/monticar/cnnarch/gluongenerator/GenerationTest.java
.../lang/monticar/cnnarch/gluongenerator/GenerationTest.java
+1
-20
src/test/java/de/monticore/lang/monticar/cnnarch/gluongenerator/util/NNArchitectureMockFactory.java
...nnarch/gluongenerator/util/NNArchitectureMockFactory.java
+1
-0
src/test/resources/architectures/Alexnet.cnna
src/test/resources/architectures/Alexnet.cnna
+2
-1
src/test/resources/architectures/RNNtest.cnna
src/test/resources/architectures/RNNtest.cnna
+1
-0
src/test/resources/architectures/ResNeXt50.cnna
src/test/resources/architectures/ResNeXt50.cnna
+2
-1
src/test/resources/architectures/ResNet152.cnna
src/test/resources/architectures/ResNet152.cnna
+2
-1
src/test/resources/architectures/ResNet34.cnna
src/test/resources/architectures/ResNet34.cnna
+1
-0
src/test/resources/architectures/SequentialAlexnet.cnna
src/test/resources/architectures/SequentialAlexnet.cnna
+1
-0
src/test/resources/architectures/ThreeInputCNN_M14.cnna
src/test/resources/architectures/ThreeInputCNN_M14.cnna
+2
-1
src/test/resources/architectures/VGG16.cnna
src/test/resources/architectures/VGG16.cnna
+2
-1
src/test/resources/architectures/data_paths.txt
src/test/resources/architectures/data_paths.txt
+1
-1
src/test/resources/target_code/CNNBufferFile.h
src/test/resources/target_code/CNNBufferFile.h
+2
-1
src/test/resources/target_code/CNNCreator_Alexnet.py
src/test/resources/target_code/CNNCreator_Alexnet.py
+1
-0
src/test/resources/target_code/CNNCreator_CifarClassifierNetwork.py
...esources/target_code/CNNCreator_CifarClassifierNetwork.py
+1
-0
src/test/resources/target_code/CNNCreator_VGG16.py
src/test/resources/target_code/CNNCreator_VGG16.py
+1
-0
src/test/resources/target_code/CNNDataLoader_Alexnet.py
src/test/resources/target_code/CNNDataLoader_Alexnet.py
+2
-1
src/test/resources/target_code/CNNDataLoader_CifarClassifierNetwork.py
...urces/target_code/CNNDataLoader_CifarClassifierNetwork.py
+2
-1
src/test/resources/target_code/CNNDataLoader_VGG16.py
src/test/resources/target_code/CNNDataLoader_VGG16.py
+2
-1
src/test/resources/target_code/CNNNet_Alexnet.py
src/test/resources/target_code/CNNNet_Alexnet.py
+1
-0
src/test/resources/target_code/CNNNet_CifarClassifierNetwork.py
...st/resources/target_code/CNNNet_CifarClassifierNetwork.py
+1
-0
src/test/resources/target_code/CNNNet_VGG16.py
src/test/resources/target_code/CNNNet_VGG16.py
+1
-0
src/test/resources/target_code/CNNPredictor_Alexnet.h
src/test/resources/target_code/CNNPredictor_Alexnet.h
+1
-0
src/test/resources/target_code/CNNPredictor_CifarClassifierNetwork.h
...sources/target_code/CNNPredictor_CifarClassifierNetwork.h
+1
-0
src/test/resources/target_code/CNNPredictor_VGG16.h
src/test/resources/target_code/CNNPredictor_VGG16.h
+1
-0
src/test/resources/target_code/CNNSupervisedTrainer_Alexnet.py
...est/resources/target_code/CNNSupervisedTrainer_Alexnet.py
+2
-1
src/test/resources/target_code/CNNSupervisedTrainer_CifarClassifierNetwork.py
...arget_code/CNNSupervisedTrainer_CifarClassifierNetwork.py
+2
-1
src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py
src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py
+2
-1
src/test/resources/target_code/CNNTrainer_emptyConfig.py
src/test/resources/target_code/CNNTrainer_emptyConfig.py
+1
-0
src/test/resources/target_code/CNNTrainer_fullConfig.py
src/test/resources/target_code/CNNTrainer_fullConfig.py
+1
-0
src/test/resources/target_code/CNNTrainer_simpleConfig.py
src/test/resources/target_code/CNNTrainer_simpleConfig.py
+1
-0
src/test/resources/target_code/ReinforcementConfig1/CNNTrainer_reinforcementConfig1.py
...e/ReinforcementConfig1/CNNTrainer_reinforcementConfig1.py
+1
-0
src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/agent.py
...code/ReinforcementConfig1/reinforcement_learning/agent.py
+1
-0
src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/cnnarch_logger.py
...forcementConfig1/reinforcement_learning/cnnarch_logger.py
+2
-1
src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/environment.py
...einforcementConfig1/reinforcement_learning/environment.py
+1
-0
src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/replay_memory.py
...nforcementConfig1/reinforcement_learning/replay_memory.py
+2
-1
src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/strategy.py
...e/ReinforcementConfig1/reinforcement_learning/strategy.py
+1
-0
src/test/resources/target_code/ReinforcementConfig1/reinforcement_learning/util.py
..._code/ReinforcementConfig1/reinforcement_learning/util.py
+1
-0
src/test/resources/target_code/ReinforcementConfig1/start_training.sh
...ources/target_code/ReinforcementConfig1/start_training.sh
+2
-1
src/test/resources/target_code/ReinforcementConfig2/CNNTrainer_reinforcementConfig2.py
...e/ReinforcementConfig2/CNNTrainer_reinforcementConfig2.py
+1
-0
src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/agent.py
...code/ReinforcementConfig2/reinforcement_learning/agent.py
+1
-0
src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/cnnarch_logger.py
...forcementConfig2/reinforcement_learning/cnnarch_logger.py
+2
-1
src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/environment.py
...einforcementConfig2/reinforcement_learning/environment.py
+1
-0
src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/replay_memory.py
...nforcementConfig2/reinforcement_learning/replay_memory.py
+2
-1
src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/strategy.py
...e/ReinforcementConfig2/reinforcement_learning/strategy.py
+1
-0
src/test/resources/target_code/ReinforcementConfig2/reinforcement_learning/util.py
..._code/ReinforcementConfig2/reinforcement_learning/util.py
+1
-0
src/test/resources/target_code/ReinforcementConfig2/start_training.sh
...ources/target_code/ReinforcementConfig2/start_training.sh
+2
-1
src/test/resources/target_code/ReinforcementConfig3/CNNTrainer_reinforcementConfig3.py
...e/ReinforcementConfig3/CNNTrainer_reinforcementConfig3.py
+1
-0
src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/agent.py
...code/ReinforcementConfig3/reinforcement_learning/agent.py
+1
-0
src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/cnnarch_logger.py
...forcementConfig3/reinforcement_learning/cnnarch_logger.py
+2
-1
src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/environment.py
...einforcementConfig3/reinforcement_learning/environment.py
+1
-0
src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/replay_memory.py
...nforcementConfig3/reinforcement_learning/replay_memory.py
+2
-1
src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/strategy.py
...e/ReinforcementConfig3/reinforcement_learning/strategy.py
+1
-0
src/test/resources/target_code/ReinforcementConfig3/reinforcement_learning/util.py
..._code/ReinforcementConfig3/reinforcement_learning/util.py
+1
-0
src/test/resources/target_code/ReinforcementConfig3/start_training.sh
...ources/target_code/ReinforcementConfig3/start_training.sh
+2
-1
src/test/resources/target_code/cmake/FindArmadillo.cmake
src/test/resources/target_code/cmake/FindArmadillo.cmake
+2
-1
src/test/resources/target_code/ddpg/CNNTrainer_actorNetwork.py
...est/resources/target_code/ddpg/CNNTrainer_actorNetwork.py
+1
-0
src/test/resources/target_code/ddpg/reinforcement_learning/CNNCreator_CriticNetwork.py
...e/ddpg/reinforcement_learning/CNNCreator_CriticNetwork.py
+1
-0
src/test/resources/target_code/ddpg/reinforcement_learning/CNNNet_CriticNetwork.py
..._code/ddpg/reinforcement_learning/CNNNet_CriticNetwork.py
+1
-0
src/test/resources/target_code/ddpg/reinforcement_learning/agent.py
...esources/target_code/ddpg/reinforcement_learning/agent.py
+1
-0
src/test/resources/target_code/ddpg/reinforcement_learning/cnnarch_logger.py
...target_code/ddpg/reinforcement_learning/cnnarch_logger.py
+2
-1
src/test/resources/target_code/ddpg/reinforcement_learning/environment.py
...es/target_code/ddpg/reinforcement_learning/environment.py
+1
-0
src/test/resources/target_code/ddpg/reinforcement_learning/replay_memory.py
.../target_code/ddpg/reinforcement_learning/replay_memory.py
+2
-1
src/test/resources/target_code/ddpg/reinforcement_learning/strategy.py
...urces/target_code/ddpg/reinforcement_learning/strategy.py
+1
-0
src/test/resources/target_code/ddpg/reinforcement_learning/util.py
...resources/target_code/ddpg/reinforcement_learning/util.py
+1
-0
src/test/resources/target_code/ddpg/start_training.sh
src/test/resources/target_code/ddpg/start_training.sh
+2
-1
src/test/resources/target_code/reinforcement_learning/agent.py
...est/resources/target_code/reinforcement_learning/agent.py
+1
-0
src/test/resources/target_code/reinforcement_learning/environment.py
...sources/target_code/reinforcement_learning/environment.py
+1
-0
src/test/resources/target_code/reinforcement_learning/replay_memory.py
...urces/target_code/reinforcement_learning/replay_memory.py
+2
-1
src/test/resources/target_code/reinforcement_learning/strategy.py
.../resources/target_code/reinforcement_learning/strategy.py
+1
-0
src/test/resources/target_code/reinforcement_learning/util.py
...test/resources/target_code/reinforcement_learning/util.py
+2
-1
src/test/resources/target_code/ros-ddpg/CNNTrainer_rosActorNetwork.py
...ources/target_code/ros-ddpg/CNNTrainer_rosActorNetwork.py
+1
-0
src/test/resources/target_code/ros-ddpg/reinforcement_learning/CNNCreator_RosCriticNetwork.py
...dpg/reinforcement_learning/CNNCreator_RosCriticNetwork.py
+1
-0
src/test/resources/target_code/ros-ddpg/reinforcement_learning/CNNNet_RosCriticNetwork.py
...os-ddpg/reinforcement_learning/CNNNet_RosCriticNetwork.py
+1
-0
src/test/resources/target_code/ros-ddpg/reinforcement_learning/agent.py
...rces/target_code/ros-ddpg/reinforcement_learning/agent.py
+1
-0
src/test/resources/target_code/ros-ddpg/reinforcement_learning/cnnarch_logger.py
...et_code/ros-ddpg/reinforcement_learning/cnnarch_logger.py
+2
-1
src/test/resources/target_code/ros-ddpg/reinforcement_learning/environment.py
...arget_code/ros-ddpg/reinforcement_learning/environment.py
+1
-0
src/test/resources/target_code/ros-ddpg/reinforcement_learning/replay_memory.py
...get_code/ros-ddpg/reinforcement_learning/replay_memory.py
+2
-1
src/test/resources/target_code/ros-ddpg/reinforcement_learning/strategy.py
...s/target_code/ros-ddpg/reinforcement_learning/strategy.py
+1
-0
src/test/resources/target_code/ros-ddpg/reinforcement_learning/util.py
...urces/target_code/ros-ddpg/reinforcement_learning/util.py
+1
-0
src/test/resources/target_code/ros-ddpg/start_training.sh
src/test/resources/target_code/ros-ddpg/start_training.sh
+2
-1
src/test/resources/target_code/td3/CNNTrainer_tD3Config.py
src/test/resources/target_code/td3/CNNTrainer_tD3Config.py
+1
-0
src/test/resources/target_code/td3/reinforcement_learning/CNNCreator_CriticNetwork.py
...de/td3/reinforcement_learning/CNNCreator_CriticNetwork.py
+1
-0
src/test/resources/target_code/td3/reinforcement_learning/CNNNet_CriticNetwork.py
...t_code/td3/reinforcement_learning/CNNNet_CriticNetwork.py
+1
-0
src/test/resources/target_code/td3/reinforcement_learning/agent.py
...resources/target_code/td3/reinforcement_learning/agent.py
+1
-0
src/test/resources/target_code/td3/reinforcement_learning/cnnarch_logger.py
.../target_code/td3/reinforcement_learning/cnnarch_logger.py
+2
-1
src/test/resources/target_code/td3/reinforcement_learning/environment.py
...ces/target_code/td3/reinforcement_learning/environment.py
+1
-0
src/test/resources/target_code/td3/reinforcement_learning/replay_memory.py
...s/target_code/td3/reinforcement_learning/replay_memory.py
+2
-1
src/test/resources/target_code/td3/reinforcement_learning/strategy.py
...ources/target_code/td3/reinforcement_learning/strategy.py
+1
-0
src/test/resources/target_code/td3/reinforcement_learning/util.py
.../resources/target_code/td3/reinforcement_learning/util.py
+1
-0
src/test/resources/target_code/td3/start_training.sh
src/test/resources/target_code/td3/start_training.sh
+2
-1
src/test/resources/valid_tests/Alexnet_alt.cnna
src/test/resources/valid_tests/Alexnet_alt.cnna
+2
-1
src/test/resources/valid_tests/Alexnet_alt2.cnna
src/test/resources/valid_tests/Alexnet_alt2.cnna
+2
-1
src/test/resources/valid_tests/ArgumentSequenceTest.cnna
src/test/resources/valid_tests/ArgumentSequenceTest.cnna
+2
-1
src/test/resources/valid_tests/CifarClassifierNetwork.cnna
src/test/resources/valid_tests/CifarClassifierNetwork.cnna
+2
-1
src/test/resources/valid_tests/EmptyConfig.cnnt
src/test/resources/valid_tests/EmptyConfig.cnnt
+1
-0
src/test/resources/valid_tests/Fixed_Alexnet.cnna
src/test/resources/valid_tests/Fixed_Alexnet.cnna
+2
-1
src/test/resources/valid_tests/Fixed_ThreeInputCNN_M14.cnna
src/test/resources/valid_tests/Fixed_ThreeInputCNN_M14.cnna
+2
-1
src/test/resources/valid_tests/FullConfig.cnnt
src/test/resources/valid_tests/FullConfig.cnnt
+1
-0
src/test/resources/valid_tests/Invariant.cnna
src/test/resources/valid_tests/Invariant.cnna
+2
-1
src/test/resources/valid_tests/MultipleStreams.cnna
src/test/resources/valid_tests/MultipleStreams.cnna
+1
-0
src/test/resources/valid_tests/ReinforcementConfig1.cnnt
src/test/resources/valid_tests/ReinforcementConfig1.cnnt
+2
-1
src/test/resources/valid_tests/ReinforcementConfig2.cnnt
src/test/resources/valid_tests/ReinforcementConfig2.cnnt
+2
-1
src/test/resources/valid_tests/ReinforcementConfig3.cnnt
src/test/resources/valid_tests/ReinforcementConfig3.cnnt
+2
-1
src/test/resources/valid_tests/ResNeXt50_InstanceTest.cnna
src/test/resources/valid_tests/ResNeXt50_InstanceTest.cnna
+2
-1
src/test/resources/valid_tests/ResNeXt50_alt.cnna
src/test/resources/valid_tests/ResNeXt50_alt.cnna
+2
-1
src/test/resources/valid_tests/ResNet152_alt.cnna
src/test/resources/valid_tests/ResNet152_alt.cnna
+2
-1
src/test/resources/valid_tests/SimpleConfig.cnnt
src/test/resources/valid_tests/SimpleConfig.cnnt
+1
-0
src/test/resources/valid_tests/SimpleNetworkLinear.cnna
src/test/resources/valid_tests/SimpleNetworkLinear.cnna
+2
-1
src/test/resources/valid_tests/SimpleNetworkRelu.cnna
src/test/resources/valid_tests/SimpleNetworkRelu.cnna
+2
-1
src/test/resources/valid_tests/SimpleNetworkSigmoid.cnna
src/test/resources/valid_tests/SimpleNetworkSigmoid.cnna
+2
-1
src/test/resources/valid_tests/SimpleNetworkSoftmax.cnna
src/test/resources/valid_tests/SimpleNetworkSoftmax.cnna
+2
-1
src/test/resources/valid_tests/SimpleNetworkTanh.cnna
src/test/resources/valid_tests/SimpleNetworkTanh.cnna
+2
-1
src/test/resources/valid_tests/ThreeInputCNN_M14_alternative.cnna
.../resources/valid_tests/ThreeInputCNN_M14_alternative.cnna
+1
-0
src/test/resources/valid_tests/data_paths.txt
src/test/resources/valid_tests/data_paths.txt
+1
-1
src/test/resources/valid_tests/ddpg-ros/RosActorNetwork.cnnt
src/test/resources/valid_tests/ddpg-ros/RosActorNetwork.cnnt
+2
-1
src/test/resources/valid_tests/ddpg-ros/comp/RosCriticNetwork.cnna
...resources/valid_tests/ddpg-ros/comp/RosCriticNetwork.cnna
+2
-1
src/test/resources/valid_tests/ddpg/ActorNetwork.cnnt
src/test/resources/valid_tests/ddpg/ActorNetwork.cnnt
+2
-1
src/test/resources/valid_tests/ddpg/comp/CriticNetwork.cnna
src/test/resources/valid_tests/ddpg/comp/CriticNetwork.cnna
+2
-1
src/test/resources/valid_tests/reward/RewardFunction.emadl
src/test/resources/valid_tests/reward/RewardFunction.emadl
+2
-1
src/test/resources/valid_tests/td3/TD3Config.cnnt
src/test/resources/valid_tests/td3/TD3Config.cnnt
+2
-1
src/test/resources/valid_tests/td3/comp/CriticNetwork.cnna
src/test/resources/valid_tests/td3/comp/CriticNetwork.cnna
+2
-1
No files found.
.circleci/config.yml
View file @
153ba019
# (c) https://github.com/MontiCore/monticore
# Java Maven CircleCI 2.0 configuration file
#
...
...
.gitlab-ci.yml
View file @
153ba019
# (c) https://github.com/MontiCore/monticore
stages
:
-
windows
...
...
.idea/vcs.xml
View file @
153ba019
<?xml version="1.0" encoding="UTF-8"?>
<!-- (c) https://github.com/MontiCore/monticore -->
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
""
vcs=
"Git"
/>
</component>
</project>
\ No newline at end of file
</project>
.travis.yml
View file @
153ba019
# (c) https://github.com/MontiCore/monticore
script
:
-
git checkout ${TRAVIS_BRANCH}
-
mvn clean install cobertura:cobertura org.eluder.coveralls:coveralls-maven-plugin:report --settings "settings.xml"
...
...
README.md
View file @
153ba019
<!-- (c) https://github.com/MontiCore/monticore -->


\ No newline at end of file

pom.xml
View file @
153ba019
<!-- (c) https://github.com/MontiCore/monticore -->
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
...
...
settings.xml
View file @
153ba019
<?xml version="1.0" encoding="UTF-8"?>
<!-- (c) https://github.com/MontiCore/monticore -->
<settings
xmlns=
"http://maven.apache.org/SETTINGS/1.0.0"
...
...
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNArch2Gluon.java
View file @
153ba019
/**
*
* ******************************************************************************
* MontiCAR Modeling Family, www.se-rwth.de
* Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
* All rights reserved.
*
* This project is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this project. If not, see <http://www.gnu.org/licenses/>.
* *******************************************************************************
*/
/* (c) https://github.com/MontiCore/monticore */
package
de.monticore.lang.monticar.cnnarch.gluongenerator
;
import
de.monticore.lang.monticar.cnnarch.generator.CNNArchGenerator
;
...
...
@@ -127,4 +108,4 @@ public class CNNArch2Gluon extends CNNArchGenerator {
}
return
fileContentMap
;
}
}
\ No newline at end of file
}
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNArch2GluonArchitectureSupportChecker.java
View file @
153ba019
/* (c) https://github.com/MontiCore/monticore */
package
de.monticore.lang.monticar.cnnarch.gluongenerator
;
import
de.monticore.lang.monticar.cnnarch._symboltable.ArchitectureSymbol
;
...
...
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNArch2GluonCli.java
View file @
153ba019
/**
*
* ******************************************************************************
* MontiCAR Modeling Family, www.se-rwth.de
* Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
* All rights reserved.
*
* This project is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this project. If not, see <http://www.gnu.org/licenses/>.
* *******************************************************************************
*/
/* (c) https://github.com/MontiCore/monticore */
package
de.monticore.lang.monticar.cnnarch.gluongenerator
;
import
de.monticore.lang.monticar.cnnarch.generator.CNNArchGenerator
;
...
...
@@ -29,4 +10,4 @@ public class CNNArch2GluonCli {
GenericCNNArchCli
cli
=
new
GenericCNNArchCli
(
generator
);
cli
.
run
(
args
);
}
}
\ No newline at end of file
}
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNArch2GluonLayerSupportChecker.java
View file @
153ba019
/* (c) https://github.com/MontiCore/monticore */
package
de.monticore.lang.monticar.cnnarch.gluongenerator
;
import
de.monticore.lang.monticar.cnnarch.predefined.AllPredefinedLayers
;
...
...
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNArch2GluonTemplateController.java
View file @
153ba019
/**
*
* ******************************************************************************
* MontiCAR Modeling Family, www.se-rwth.de
* Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
* All rights reserved.
*
* This project is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this project. If not, see <http://www.gnu.org/licenses/>.
* *******************************************************************************
*/
/* (c) https://github.com/MontiCore/monticore */
package
de.monticore.lang.monticar.cnnarch.gluongenerator
;
import
de.monticore.lang.monticar.cnnarch.generator.ArchitectureElementData
;
...
...
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNArch2GluonTrainParamSupportChecker.java
View file @
153ba019
/**
*
* ******************************************************************************
* MontiCAR Modeling Family, www.se-rwth.de
* Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
* All rights reserved.
*
* This project is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this project. If not, see <http://www.gnu.org/licenses/>.
* *******************************************************************************
*/
/* (c) https://github.com/MontiCore/monticore */
package
de.monticore.lang.monticar.cnnarch.gluongenerator
;
import
de.monticore.lang.monticar.cnnarch.generator.TrainParamSupportChecker
;
public
class
CNNArch2GluonTrainParamSupportChecker
extends
TrainParamSupportChecker
{
}
\ No newline at end of file
}
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNTrain2Gluon.java
View file @
153ba019
/* (c) https://github.com/MontiCore/monticore */
package
de.monticore.lang.monticar.cnnarch.gluongenerator
;
import
com.google.common.collect.Maps
;
...
...
@@ -253,4 +254,4 @@ public class CNNTrain2Gluon extends CNNTrainGenerator {
return
fileContentMap
;
}
}
\ No newline at end of file
}
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/GluonConfigurationData.java
View file @
153ba019
/* (c) https://github.com/MontiCore/monticore */
package
de.monticore.lang.monticar.cnnarch.gluongenerator
;
import
de.monticore.lang.monticar.cnnarch.gluongenerator.reinforcement.RewardFunctionParameterAdapter
;
...
...
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/GluonTemplateConfiguration.java
View file @
153ba019
/* (c) https://github.com/MontiCore/monticore */
package
de.monticore.lang.monticar.cnnarch.gluongenerator
;
import
de.monticore.lang.monticar.cnnarch.generator.TemplateConfiguration
;
...
...
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/NetDefinitionMode.java
View file @
153ba019
/* (c) https://github.com/MontiCore/monticore */
package
de.monticore.lang.monticar.cnnarch.gluongenerator
;
/**
...
...
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/annotations/ArchitectureAdapter.java
View file @
153ba019
/* (c) https://github.com/MontiCore/monticore */
package
de.monticore.lang.monticar.cnnarch.gluongenerator.annotations
;
import
de.monticore.lang.monticar.cnnarch._symboltable.ArchitectureSymbol
;
...
...
@@ -92,4 +93,4 @@ public class ArchitectureAdapter extends NNArchitectureSymbol {
ioSymbols
.
addAll
(
getIOInputSymbols
());
return
ioSymbols
;
}
}
\ No newline at end of file
}
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/reinforcement/FunctionParameterChecker.java
View file @
153ba019
/* (c) https://github.com/MontiCore/monticore */
package
de.monticore.lang.monticar.cnnarch.gluongenerator.reinforcement
;
import
de.se_rwth.commons.logging.Log
;
...
...
@@ -106,4 +107,4 @@ public class FunctionParameterChecker {
Log
.
error
(
message
);
//System.exit(-1);
}
}
\ No newline at end of file
}
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/reinforcement/RewardFunctionParameterAdapter.java
View file @
153ba019
/* (c) https://github.com/MontiCore/monticore */
package
de.monticore.lang.monticar.cnnarch.gluongenerator.reinforcement
;
import
de.monticore.lang.monticar.cnntrain.annotations.RewardFunctionParameter
;
...
...
@@ -133,4 +134,4 @@ public class RewardFunctionParameterAdapter implements RewardFunctionParameter {
return
Optional
.
ofNullable
(
this
.
inputTerminalParameterName
);
}
}
\ No newline at end of file
}
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/reinforcement/RewardFunctionSourceGenerator.java
View file @
153ba019
/* (c) https://github.com/MontiCore/monticore */
package
de.monticore.lang.monticar.cnnarch.gluongenerator.reinforcement
;
import
de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol
;
...
...
@@ -11,4 +12,4 @@ public interface RewardFunctionSourceGenerator {
EMAComponentInstanceSymbol
resolveSymbol
(
TaggingResolver
taggingResolver
,
String
rootModel
);
void
generate
(
String
modelPath
,
String
rootModel
,
String
targetPath
);
void
generate
(
EMAComponentInstanceSymbol
componentInstanceSymbol
,
TaggingResolver
taggingResolver
,
String
targetPath
);
}
\ No newline at end of file
}
src/main/resources/templates/gluon/CNNBufferFile.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
#ifndef CNNBUFFERFILE_H
#define CNNBUFFERFILE_H
...
...
src/main/resources/templates/gluon/CNNCreator.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
import mxnet as mx
import logging
import os
...
...
src/main/resources/templates/gluon/CNNDataLoader.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
import os
import h5py
import mxnet as mx
...
...
@@ -90,4 +91,4 @@ class ${tc.fileNameWithoutEnding}:
return train_h5, test_h5
else:
logging.error("Data loading failure. File '" + os.path.abspath(train_path) + "' does not exist.")
sys.exit(1)
\ No newline at end of file
sys.exit(1)
src/main/resources/templates/gluon/CNNNet.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
import mxnet as mx
import numpy as np
from mxnet import gluon
...
...
@@ -92,4 +93,4 @@ ${tc.include(stream, "FORWARD_FUNCTION")}
return ${tc.join(tc.getStreamOutputNames(stream), ", ")}
</#if>
</#list>
\ No newline at end of file
</#list>
src/main/resources/templates/gluon/CNNPredictor.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
#ifndef ${tc.fileNameWithoutEnding?upper_case}
#define ${tc.fileNameWithoutEnding?upper_case}
...
...
src/main/resources/templates/gluon/CNNSupervisedTrainer.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
import mxnet as mx
import logging
import numpy as np
...
...
@@ -233,4 +234,4 @@ class ${tc.fileNameWithoutEnding}:
network.export(self.parameter_path(i) + '_newest', epoch=0)
def parameter_path(self, index):
return self._net_creator._model_dir_ + self._net_creator._model_prefix_ + '_' + str(index)
\ No newline at end of file
return self._net_creator._model_dir_ + self._net_creator._model_prefix_ + '_' + str(index)
src/main/resources/templates/gluon/CNNTrainer.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
import logging
import mxnet as mx
<#list configurations as config>
...
...
@@ -58,4 +59,4 @@ if __name__ == "__main__":
}
</#if>
)
</#list>
\ No newline at end of file
</#list>
src/main/resources/templates/gluon/elements/Add.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#if mode == "FORWARD_FUNCTION">
${element.name} = ${tc.join(element.inputs, " + ")}
<#elseif mode == "PYTHON_INLINE">
...
...
@@ -7,4 +8,4 @@
for (size_t i = 0; i != ${element.name}.size(); ++i) {
${element.name}[i] = ${tc.join(element.inputs, " + ", "", "[i]")};
}
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/BatchNorm.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#assign input = element.inputs[0]>
<#-- TODO: Find solution for the CNNArch fix_gamma parameter of BatchNorm. Gluon does not provide this parameter-->
<#if mode == "ARCHITECTURE_DEFINITION">
...
...
@@ -5,4 +6,4 @@
<#include "OutputShape.ftl">
<#elseif mode == "FORWARD_FUNCTION">
${element.name} = self.${element.name}(${input})
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/Concatenate.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#if mode == "ARCHITECTURE_DEFINITION">
self.${element.name} = Concatenate(dim=1)
<#include "OutputShape.ftl">
<#elseif mode == "FORWARD_FUNCTION">
${element.name} = self.${element.name}(${tc.join(element.inputs, ", ")})
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/Const.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#if mode == "FORWARD_FUNCTION">
${element.name} = gluon.Const('${element.name}', ${element.constValue})
<#elseif mode == "PYTHON_INLINE">
${element.name} = nd.array(${element.constValue})
<#elseif mode == "CPP_INLINE">
vector<float> ${element.name}{${element.constValue}};
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/Convolution.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#assign input = element.inputs[0]>
<#if mode == "ARCHITECTURE_DEFINITION">
<#if element.padding??>
...
...
@@ -14,4 +15,4 @@
<#assign input = element.name + "padding">
</#if>
${element.name} = self.${element.name}(${input})
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/Dropout.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#assign rate = element.p?c>
<#assign input = element.inputs[0]>
<#if mode == "ARCHITECTURE_DEFINITION">
self.${element.name} = gluon.nn.Dropout(rate=${rate})
<#elseif mode == "FORWARD_FUNCTION">
${element.name} = self.${element.name}(${input})
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/Embedding.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#assign input = element.inputs[0]>
<#if mode == "ARCHITECTURE_DEFINITION">
self.${element.name} = gluon.nn.Embedding(input_dim=${element.inputDim?c}, output_dim=${element.outputDim?c})
<#include "OutputShape.ftl">
<#elseif mode == "FORWARD_FUNCTION">
${element.name} = self.${element.name}(${input})
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/Flatten.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#assign input = element.inputs[0]>
<#if mode == "ARCHITECTURE_DEFINITION">
self.${element.name} = gluon.nn.Flatten()
<#include "OutputShape.ftl">
<#elseif mode == "FORWARD_FUNCTION">
${element.name} = self.${element.name}(${input})
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/FullyConnected.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#assign input = element.inputs[0]>
<#assign units = element.units?c>
<#assign use_bias = element.noBias?string("False","True")>
...
...
@@ -7,4 +8,4 @@
<#include "OutputShape.ftl">
<#elseif mode == "FORWARD_FUNCTION">
${element.name} = self.${element.name}(${input})
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/GRU.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#if element.member == "NONE">
<#assign input = element.inputs[0]>
<#if mode == "ARCHITECTURE_DEFINITION">
...
...
@@ -24,4 +25,4 @@
${element.name} = ${input}
</#if>
</#if>
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/Get.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#if mode == "FORWARD_FUNCTION">
${element.name} = ${element.inputs[element.index]}
<#elseif mode == "PYTHON_INLINE">
${element.name} = ${element.inputs[element.index]}
<#elseif mode == "CPP_INLINE">
vector<float> ${element.name} = ${element.inputs[element.index]};
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/GlobalPooling.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#assign input = element.inputs[0]>
<#assign poolType = element.poolType>
<#if poolType == "avg">
...
...
@@ -10,4 +11,4 @@
<#include "OutputShape.ftl">
<#elseif mode == "FORWARD_FUNCTION">
${element.name} = self.${element.name}(${input})
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/Input.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#if mode == "ARCHITECTURE_DEFINITION">
if data_mean:
assert(data_std)
...
...
@@ -8,4 +9,4 @@
<#elseif mode == "FORWARD_FUNCTION">
${element.name} = self.input_normalization_${element.name}(${element.name})
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/LSTM.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#if element.member == "NONE">
<#assign input = element.inputs[0]>
<#if mode == "ARCHITECTURE_DEFINITION">
...
...
@@ -24,4 +25,4 @@
${element.name} = ${input}
</#if>
</#if>
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/Lrn.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#assign input = element.inputs[0]>
<#if mode == "FORWARD_FUNCTION">
${element.name} = F.LRN(data=${input},
...
...
@@ -5,4 +6,4 @@
beta=${element.beta?c},
knorm=${element.knorm?c},
nsize=${element.nsize?c})
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/OneHot.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#assign input = element.inputs[0]>
<#assign size = element.size?c>
<#if mode == "ARCHITECTURE_DEFINITION">
...
...
@@ -10,4 +11,4 @@
<#elseif mode == "CPP_INLINE">
vector<float> ${element.name}(${size}, 0);
${element.name}[${input}[0]] = 1;
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/Output.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#if element.inputs?size gte 1>
<#assign input = element.inputs[0]>
<#if mode == "FORWARD_FUNCTION">
...
...
@@ -7,4 +8,4 @@
<#elseif mode == "CPP_INLINE">
${element.name} = ${input};
</#if>
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/OutputShape.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
# ${element.name}, output shape: {<#list element.element.outputTypes as type>[${tc.join(type.dimensions, ",")}]</#list>}
src/main/resources/templates/gluon/elements/Pooling.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#assign input = element.inputs[0]>
<#assign poolType = element.poolType>
<#assign poolSize = "(" + tc.join(element.kernel, ",") + ")">
...
...
@@ -21,4 +22,4 @@
<#assign input = element.name + "padding">
</#if>
${element.name} = self.${element.name}(${input})
</#if>
\ No newline at end of file
</#if>
src/main/resources/templates/gluon/elements/RNN.ftl
View file @
153ba019
<#-- (c) https://github.com/MontiCore/monticore -->
<#if element.member == "NONE">
<#assign input = element.inputs[0]>
<#if mode == "ARCHITECTURE_DEFINITION">
...
...
@@ -25,4 +26,4 @@
${element.name} = ${input}
</#if>
</#if>
</#if>
\ No newline at end of file