Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
generators
CNNArch2Gluon
Commits
7cc127f0
Commit
7cc127f0
authored
Jul 28, 2021
by
lr119628
Browse files
[update] code cleanup
parent
70819612
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNArch2GluonTemplateController.java
View file @
7cc127f0
...
...
@@ -21,6 +21,16 @@ public class CNNArch2GluonTemplateController extends CNNArchTemplateController {
TemplateConfiguration
templateConfiguration
)
{
super
(
architecture
,
templateConfiguration
);
}
public
String
getDefinedOutputDimension
(){
// function calculates the output shape as defined in the .emadl, used for AdaNet layer
ArchTypeSymbol
types
=
((
IODeclarationSymbol
)
this
.
getArchitecture
().
getOutputs
().
get
(
0
).
getDeclaration
()).
getType
();
StringBuilder
stringBuilder
=
new
StringBuilder
();
stringBuilder
.
append
(
"("
);
types
.
getDimensions
().
forEach
(
elem
->
stringBuilder
.
append
(
elem
).
append
(
','
));
stringBuilder
.
append
(
")"
);
return
stringBuilder
.
toString
();
}
public
void
include
(
String
relativePath
,
String
templateWithoutFileEnding
,
Writer
writer
,
NetDefinitionMode
netDefinitionMode
){
...
...
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