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
CNNArch2Gluon
Commits
c68409e0
Commit
c68409e0
authored
Aug 21, 2019
by
Christian Fuß
Browse files
adjusted code to deal with changes in UnrollSymbol
parent
45598520
Pipeline
#174380
failed with stages
in 2 minutes and 7 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
_gitignore
0 → 100644
View file @
c68409e0
target
nppBackup
.project
.settings
.classpath
.idea
.git
*.iml
_gitlab-ci.yml
0 → 100644
View file @
c68409e0
#
#
# ******************************************************************************
# 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/>.
# *******************************************************************************
#
stages
:
-
windows
-
linux
masterJobLinux
:
stage
:
linux
image
:
maven:3-jdk-8
script
:
-
mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean deploy --settings settings.xml
-
cat target/site/jacoco/index.html
-
mvn package sonar:sonar -s settings.xml
only
:
-
master
masterJobWindows
:
stage
:
windows
script
:
-
mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings settings.xml
tags
:
-
Windows10
BranchJobLinux
:
stage
:
linux
image
:
maven:3-jdk-8
script
:
-
mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings settings.xml
-
cat target/site/jacoco/index.html
except
:
-
master
_travis.yml
0 → 100644
View file @
c68409e0
script
:
-
git checkout ${TRAVIS_BRANCH}
-
mvn clean install cobertura:cobertura org.eluder.coveralls:coveralls-maven-plugin:report --settings "settings.xml"
after_success
:
-
if [ "${TRAVIS_BRANCH}" == "master" ]; then mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B deploy --debug --settings "./settings.xml"; fi
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNArch2GluonTemplateController.java
View file @
c68409e0
...
...
@@ -104,7 +104,7 @@ public class CNNArch2GluonTemplateController extends CNNArchTemplateController {
public
void
include
(
UnrollSymbol
unrollElement
,
Writer
writer
,
NetDefinitionMode
netDefinitionMode
){
ArchitectureElementData
previousElement
=
getCurrentElement
();
setCurrentElement
(
unrollElement
);
//
setCurrentElement(unrollElement);
if
(
unrollElement
.
getBody
().
getElements
().
get
(
0
).
isInput
())
{
include
(
unrollElement
.
getBody
().
getElements
().
get
(
0
).
getResolvedThis
().
get
(),
writer
,
netDefinitionMode
);
...
...
@@ -151,9 +151,6 @@ public class CNNArch2GluonTemplateController extends CNNArchTemplateController {
else
if
(
architectureElement
instanceof
LayerSymbol
){
include
((
LayerSymbol
)
architectureElement
,
writer
,
netDefinitionMode
);
}
else
if
(
architectureElement
instanceof
UnrollSymbol
){
include
((
UnrollSymbol
)
architectureElement
,
writer
,
netDefinitionMode
);
}
else
if
(
architectureElement
instanceof
ConstantSymbol
)
{
include
((
ConstantSymbol
)
architectureElement
,
writer
,
netDefinitionMode
);
}
...
...
@@ -163,12 +160,14 @@ public class CNNArch2GluonTemplateController extends CNNArchTemplateController {
}
public
void
include
(
ArchitectureElementSymbol
architectureElementSymbol
,
String
netDefinitionMode
)
{
//System.err.println("INCLUDE: " + ((SerialCompositeElementSymbol)architectureElementSymbol).getElements().toString());
System
.
err
.
println
(
architectureElementSymbol
.
getSpannedScope
().
getSpanningSymbol
().
get
().
getClass
());
System
.
err
.
println
(
"isUnroll? "
+
(
architectureElementSymbol
.
getSpannedScope
().
getSpanningSymbol
().
get
()
instanceof
UnrollSymbol
));
include
(
architectureElementSymbol
,
NetDefinitionMode
.
fromString
(
netDefinitionMode
));
}
public
void
include
(
UnrollSymbol
unrollSymbol
,
String
netDefinitionMode
)
{
include
(
unrollSymbol
,
NetDefinitionMode
.
fromString
(
netDefinitionMode
));
}
public
void
include
(
ArchitectureElementSymbol
architectureElement
,
NetDefinitionMode
netDefinitionMode
){
if
(
getWriter
()
==
null
){
throw
new
IllegalStateException
(
"missing writer"
);
...
...
@@ -176,6 +175,13 @@ public class CNNArch2GluonTemplateController extends CNNArchTemplateController {
include
(
architectureElement
,
getWriter
(),
netDefinitionMode
);
}
public
void
include
(
UnrollSymbol
unroll
,
NetDefinitionMode
netDefinitionMode
){
if
(
getWriter
()
==
null
){
throw
new
IllegalStateException
(
"missing writer"
);
}
include
(
unroll
,
getWriter
(),
netDefinitionMode
);
}
public
Set
<
String
>
getStreamInputNames
(
SerialCompositeElementSymbol
stream
)
{
return
getStreamInputs
(
stream
).
keySet
();
}
...
...
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