Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
monticore
EmbeddedMontiArc
generators
EMADL2CPP
Commits
c98e264e
Commit
c98e264e
authored
Oct 25, 2018
by
Carlos Alfredo Yeverino Rodriguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix index bug in inputVector according to the new version of EMAM2CPP
parent
cbb1ad67
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/test/resources/models/cifar10/ArgMax.emadl
src/test/resources/models/cifar10/ArgMax.emadl
+1
-1
src/test/resources/target_code/cifar10_cifar10Classifier_calculateClass.h
...es/target_code/cifar10_cifar10Classifier_calculateClass.h
+1
-1
No files found.
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
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