Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
generators
CNNArch2MXNet
Commits
f6c55410
Commit
f6c55410
authored
Jan 30, 2019
by
Christopher Jan-Steffen Brix
Browse files
Data path is read from architecture symbol
parent
ce32aaa3
Pipeline
#101402
failed with stages
in 1 minute
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/monticar/cnnarch/mxnetgenerator/CNNArch2MxNet.java
View file @
f6c55410
...
...
@@ -80,6 +80,7 @@ public class CNNArch2MxNet implements CNNArchGenerator {
CNNArchCocos
.
checkAll
(
compilationUnit
.
get
());
try
{
compilationUnit
.
get
().
getArchitecture
().
setDataPath
(
"Temporary - read the correct data path from the config!"
);
generateFiles
(
compilationUnit
.
get
().
getArchitecture
());
}
catch
(
IOException
e
){
...
...
src/main/java/de/monticore/lang/monticar/cnnarch/mxnetgenerator/CNNArchTemplateController.java
View file @
f6c55410
...
...
@@ -86,6 +86,10 @@ public class CNNArchTemplateController {
return
getArchitecture
().
getEnclosingScope
().
getSpanningSymbol
().
get
().
getFullName
().
replaceAll
(
"\\."
,
"_"
);
}
public
String
getDataPath
(){
return
getArchitecture
().
getDataPath
();
}
public
List
<
String
>
getLayerInputs
(
ArchitectureElementSymbol
layer
){
List
<
String
>
inputNames
=
new
ArrayList
<>();
...
...
src/main/resources/templates/mxnet/CNNCreator.ftl
View file @
f6c55410
...
...
@@ -18,7 +18,7 @@ class MyConstant(mx.init.Initializer):
class
$
{
tc
.fileNameWithoutEnding
}
:
module = None
_data_dir_ = "data/$
{
tc
.
fullArchitectureName
}
/"
_data_dir_ = "data/$
{
tc
.
dataPath
}
/"
_model_dir_ = "model/$
{
tc
.fullArchitectureName
}
/"
_model_prefix_ = "$
{
tc
.architectureName
}
"
_input_names_ = [$
{
tc
.join
(
tc
.architectureInputs
,
","
,
"'"
,
"'"
)}
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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