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
ec3f56ed
Commit
ec3f56ed
authored
May 27, 2019
by
Sebastian Nickels
Browse files
Fixed tests and reverted _label change since it is necessary for MXNet
parent
1812de35
Pipeline
#144203
failed with stages
in 3 minutes and 16 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/resources/templates/gluon/CNNDataLoader.ftl
View file @
ec3f56ed
...
...
@@ -7,7 +7,7 @@ from mxnet import nd
class
$
{
tc
.fileNameWithoutEnding
}
:
_input_names_ = [$
{
tc
.join
(
tc
.architectureInputs
,
","
,
"'"
,
"'"
)}
]
_output_names_ = [$
{
tc
.join
(
tc
.architectureOutputs
,
","
,
"'"
,
"'"
)}
]
_output_names_ = [$
{
tc
.join
(
tc
.architectureOutputs
,
","
,
"'"
,
"
_label
'"
)}
]
def __init__(self):
self._data_dir = "$
{
tc
.dataPath
}
/"
...
...
src/test/java/de/monticore/lang/monticar/cnnarch/gluongenerator/GenerationTest.java
View file @
ec3f56ed
...
...
@@ -127,7 +127,7 @@ public class GenerationTest extends AbstractSymtabTest {
Log
.
getFindings
().
clear
();
String
[]
args
=
{
"-m"
,
"src/test/resources/invalid_tests"
,
"-r"
,
"MultipleOutputs"
};
CNNArch2GluonCli
.
main
(
args
);
assertTrue
(
Log
.
getFindings
().
size
()
==
2
);
assertTrue
(
Log
.
getFindings
().
size
()
==
3
);
}
@Test
...
...
@@ -135,7 +135,7 @@ public class GenerationTest extends AbstractSymtabTest {
Log
.
getFindings
().
clear
();
String
[]
args
=
{
"-m"
,
"src/test/resources/invalid_tests"
,
"-r"
,
"MultipleStreams"
};
CNNArch2GluonCli
.
main
(
args
);
assertTrue
(
Log
.
getFindings
().
size
()
==
2
);
assertTrue
(
Log
.
getFindings
().
size
()
==
1
);
}
@Test
...
...
src/test/resources/target_code/CNNDataLoader_Alexnet.py
View file @
ec3f56ed
...
...
@@ -7,7 +7,7 @@ from mxnet import nd
class
CNNDataLoader_Alexnet
:
_input_names_
=
[
'data'
]
_output_names_
=
[
'predictions'
]
_output_names_
=
[
'predictions
_label
'
]
def
__init__
(
self
):
self
.
_data_dir
=
"data/Alexnet/"
...
...
src/test/resources/target_code/CNNDataLoader_CifarClassifierNetwork.py
View file @
ec3f56ed
...
...
@@ -7,7 +7,7 @@ from mxnet import nd
class
CNNDataLoader_CifarClassifierNetwork
:
_input_names_
=
[
'data'
]
_output_names_
=
[
'softmax'
]
_output_names_
=
[
'softmax
_label
'
]
def
__init__
(
self
):
self
.
_data_dir
=
"data/CifarClassifierNetwork/"
...
...
src/test/resources/target_code/CNNDataLoader_VGG16.py
View file @
ec3f56ed
...
...
@@ -7,7 +7,7 @@ from mxnet import nd
class
CNNDataLoader_VGG16
:
_input_names_
=
[
'data'
]
_output_names_
=
[
'predictions'
]
_output_names_
=
[
'predictions
_label
'
]
def
__init__
(
self
):
self
.
_data_dir
=
"data/VGG16/"
...
...
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