Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
monticore
EmbeddedMontiArc
generators
CNNArch2X
Commits
31fca28b
Commit
31fca28b
authored
Jan 08, 2020
by
Julian Dierkes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made changes to make generator work with changes in CNNTrain regarding map type in grammar
parent
418c39ab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
3 deletions
+26
-3
pom.xml
pom.xml
+1
-1
src/main/java/de/monticore/lang/monticar/cnnarch/generator/ArchitectureElementData.java
...g/monticar/cnnarch/generator/ArchitectureElementData.java
+2
-2
src/main/java/de/monticore/lang/monticar/cnnarch/generator/ConfigurationData.java
...re/lang/monticar/cnnarch/generator/ConfigurationData.java
+23
-0
No files found.
pom.xml
View file @
31fca28b
...
...
@@ -19,7 +19,7 @@
<CNNArch.version>
0.3.4-SNAPSHOT
</CNNArch.version>
<CNNTrain.version>
0.3.9-SNAPSHOT
</CNNTrain.version>
<embedded-montiarc-math-opt-generator>
0.1.
5
</embedded-montiarc-math-opt-generator>
<embedded-montiarc-math-opt-generator>
0.1.
6
</embedded-montiarc-math-opt-generator>
<!-- .. Libraries .................................................. -->
<guava.version>
18.0
</guava.version>
...
...
src/main/java/de/monticore/lang/monticar/cnnarch/generator/ArchitectureElementData.java
View file @
31fca28b
...
...
@@ -250,11 +250,11 @@ public class ArchitectureElementData {
return
Arrays
.
asList
(
bottomPad
,
rightPad
);
}
public
boolean
getStart
()
{
/*
public boolean getStart() {
return getLayerSymbol().getBooleanValue(AllPredefinedLayers.START_NAME).get();
}
public boolean getEnd() {
return getLayerSymbol().getBooleanValue(AllPredefinedLayers.END_NAME).get();
}
}
*/
}
\ No newline at end of file
src/main/java/de/monticore/lang/monticar/cnnarch/generator/ConfigurationData.java
View file @
31fca28b
...
...
@@ -2,6 +2,8 @@
package
de.monticore.lang.monticar.cnnarch.generator
;
import
de.monticore.lang.monticar.cnntrain._symboltable.*
;
import
jline.internal.Log
;
import
static
de
.
monticore
.
lang
.
monticar
.
cnntrain
.
helper
.
ConfigEntryNameConstants
.*;
import
java.util.ArrayList
;
...
...
@@ -171,6 +173,27 @@ public class ConfigurationData {
return
(
Boolean
)
getConfiguration
().
getEntry
(
"eval_train"
).
getValue
().
getValue
();
}
protected
Map
<
String
,
Map
<
String
,
Object
>>
getMultiParamMapEntry
(
final
String
key
,
final
String
valueName
)
{
if
(!
configurationContainsKey
(
key
))
{
return
null
;
}
Map
<
String
,
Map
<
String
,
Object
>>
resultView
=
new
HashMap
<>();
ValueSymbol
value
=
this
.
getConfiguration
().
getEntryMap
().
get
(
key
).
getValue
();
if
(
value
instanceof
MultiParamValueMapSymbol
)
{
MultiParamValueMapSymbol
multiParamValueMap
=
(
MultiParamValueMapSymbol
)
value
;
resultView
.
putAll
(
multiParamValueMap
.
getParameters
());
Map
<
String
,
String
>
names
=
multiParamValueMap
.
getMultiParamValueNames
();
for
(
String
distrName
:
names
.
keySet
())
{
resultView
.
get
(
distrName
).
put
(
valueName
,
names
.
get
(
distrName
));
}
}
return
resultView
;
}
protected
Map
<
String
,
Object
>
getMultiParamEntry
(
final
String
key
,
final
String
valueName
)
{
if
(!
configurationContainsKey
(
key
))
{
return
null
;
...
...
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