Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
CNNArch2MXNet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
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
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
CNNArch2MXNet
Commits
10de417f
Commit
10de417f
authored
Jan 31, 2019
by
nilsfreyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed directory dependencies to componentName for weightsharing
parent
fc56ba27
Pipeline
#101587
failed with stages
in 28 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
src/main/java/de/monticore/lang/monticar/cnnarch/mxnetgenerator/CNNArchTemplateController.java
...car/cnnarch/mxnetgenerator/CNNArchTemplateController.java
+4
-0
src/main/resources/templates/mxnet/CNNCreator.ftl
src/main/resources/templates/mxnet/CNNCreator.ftl
+2
-2
src/main/resources/templates/mxnet/CNNPredictor.ftl
src/main/resources/templates/mxnet/CNNPredictor.ftl
+2
-2
No files found.
src/main/java/de/monticore/lang/monticar/cnnarch/mxnetgenerator/CNNArchTemplateController.java
View file @
10de417f
...
...
@@ -127,6 +127,10 @@ public class CNNArchTemplateController {
return
list
;
}
public
String
getComponentName
(){
return
getArchitecture
().
getComponentName
();
}
public
void
include
(
String
relativePath
,
String
templateWithoutFileEnding
,
Writer
writer
){
String
templatePath
=
relativePath
+
templateWithoutFileEnding
+
FTL_FILE_ENDING
;
Map
<
String
,
Object
>
ftlContext
=
new
HashMap
<>();
...
...
src/main/resources/templates/mxnet/CNNCreator.ftl
View file @
10de417f
...
...
@@ -19,8 +19,8 @@ class ${tc.fileNameWithoutEnding}:
module = None
_data_dir_ = "${tc.dataPath}/"
_model_dir_ = "model/${tc.
fullArchitecture
Name}/"
_model_prefix_ = "
${tc.architectureName}
"
_model_dir_ = "model/${tc.
component
Name}/"
_model_prefix_ = "
model
"
_input_names_ = [${tc.join(tc.architectureInputs, ",", "'", "'")}]
_input_shapes_ = [<#list tc.architecture.inputs as input>(${tc.join(input.definition.type.dimensions, ",")})</#list>]
_output_names_ = [${tc.join(tc.architectureOutputs, ",", "'", "_label'")}]
...
...
src/main/resources/templates/mxnet/CNNPredictor.ftl
View file @
10de417f
...
...
@@ -11,8 +11,8 @@
class ${tc.fileNameWithoutEnding}{
public:
const std::string json_file = "model/${tc.
fullArchitectureName}/${tc.architectureName}
_newest-symbol.json";
const std::string param_file = "model/${tc.
fullArchitectureName}/${tc.architectureName}
_newest-0000.params";
const std::string json_file = "model/${tc.
componentName}/model
_newest-symbol.json";
const std::string param_file = "model/${tc.
componentName}/model
_newest-0000.params";
//const std::vector<std::string> input_keys = {"data"};
const std::vector<std::string> input_keys = {${tc.join(tc.architectureInputs, ",", "\"", "\"")}};
const std::vector<std::vector<mx_uint>> input_shapes = {<#list tc.architecture.inputs as input>{1,${tc.join(input.definition.type.dimensions, ",")}}<#if input?has_next>,</#if></#list>};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment