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
CNNArch2Caffe2
Commits
980d2c19
Commit
980d2c19
authored
Feb 21, 2019
by
Evgeny Kusmenko
Browse files
Merge branch 'bugfix_layer_checker' into 'master'
bugfix for layer checker See merge request
!28
parents
c18c2cf5
7b1da0a4
Pipeline
#106716
passed with stages
in 4 minutes and 10 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/monticar/cnnarch/caffe2generator/CNNArch2Caffe2.java
View file @
980d2c19
...
...
@@ -26,7 +26,6 @@ import de.monticore.lang.monticar.cnnarch._cocos.CNNArchCocos;
import
de.monticore.lang.monticar.cnnarch._symboltable.ArchitectureSymbol
;
import
de.monticore.lang.monticar.cnnarch._symboltable.ArchitectureElementSymbol
;
import
de.monticore.lang.monticar.cnnarch._symboltable.CompositeElementSymbol
;
import
de.monticore.lang.monticar.cnnarch._symboltable.LayerSymbol
;
import
de.monticore.lang.monticar.cnnarch._symboltable.CNNArchCompilationUnitSymbol
;
import
de.monticore.lang.monticar.cnnarch._symboltable.CNNArchLanguage
;
import
de.monticore.lang.monticar.generator.FileContent
;
...
...
@@ -51,8 +50,7 @@ public class CNNArch2Caffe2 implements CNNArchGenerator{
private
boolean
isSupportedLayer
(
ArchitectureElementSymbol
element
,
LayerSupportChecker
layerChecker
){
List
<
ArchitectureElementSymbol
>
constructLayerElemList
;
//first part of if condition ensures that element is not an IOSymbol
if
(
element
instanceof
LayerSymbol
&&
(
element
.
getResolvedThis
().
get
()
instanceof
CompositeElementSymbol
))
{
if
(
element
.
getResolvedThis
().
get
()
instanceof
CompositeElementSymbol
)
{
constructLayerElemList
=
((
CompositeElementSymbol
)
element
.
getResolvedThis
().
get
()).
getElements
();
for
(
ArchitectureElementSymbol
constructedLayerElement
:
constructLayerElemList
)
{
if
(!
isSupportedLayer
(
constructedLayerElement
,
layerChecker
))
{
...
...
src/test/java/de/monticore/lang/monticar/cnnarch/caffe2generator/GenerationTest.java
View file @
980d2c19
...
...
@@ -136,8 +136,13 @@ public class GenerationTest extends AbstractSymtabTest{
public
void
testMultipleOutputs
()
throws
IOException
,
TemplateException
{
Log
.
getFindings
().
clear
();
String
[]
args
=
{
"-m"
,
"src/test/resources/valid_tests"
,
"-r"
,
"MultipleOutputs"
};
exit
.
expectSystemExit
();
exit
.
checkAssertionAfterwards
(
new
Assertion
()
{
public
void
checkAssertion
()
{
assertTrue
(
Log
.
getFindings
().
size
()
==
2
);
}
});
CNNArch2Caffe2Cli
.
main
(
args
);
assertTrue
(
Log
.
getFindings
().
size
()
==
3
);
}
@Test
...
...
Write
Preview
Supports
Markdown
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