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
EMADL2CPP
Commits
c98e264e
Commit
c98e264e
authored
Oct 25, 2018
by
Carlos Alfredo Yeverino Rodriguez
Browse files
Fix index bug in inputVector according to the new version of EMAM2CPP
parent
cbb1ad67
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/test/resources/models/cifar10/ArgMax.emadl
View file @
c98e264e
...
...
@@ -6,7 +6,7 @@ component ArgMax<Z(1:oo) n = 2>{
implementation
Math
{
maxIndex
=
0
;
Q
maxValue
=
inputVector
(
0
);
//
should
be
inputVector
(
1
)
but
bug
in
EMAM2CPP
Q
maxValue
=
inputVector
(
1
);
for
i
=
2
:
n
//
should
be
2
:
n
but
bug
in
EMAM2CPP
if
inputVector
(
i
)
>
maxValue
...
...
src/test/resources/target_code/cifar10_cifar10Classifier_calculateClass.h
View file @
c98e264e
...
...
@@ -17,7 +17,7 @@ inputVector=colvec(n);
void
execute
()
{
maxIndex
=
0
;
double
maxValue
=
inputVector
(
0
-
1
);
double
maxValue
=
inputVector
(
1
-
1
);
for
(
auto
i
=
2
;
i
<=
n
;
++
i
){
if
((
inputVector
(
i
-
1
)
>
maxValue
)){
maxIndex
=
i
-
1
;
...
...
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