Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
monticore
EmbeddedMontiArc
generators
EMADL2CPP
Commits
48a98935
Commit
48a98935
authored
Jan 28, 2020
by
Sebastian N.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated test
parent
c37e1ead
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
src/test/resources/target_code/gluon/CNNSupervisedTrainer_mnist_mnistClassifier_net.py
...e/gluon/CNNSupervisedTrainer_mnist_mnistClassifier_net.py
+6
-1
No files found.
src/test/resources/target_code/gluon/CNNSupervisedTrainer_mnist_mnistClassifier_net.py
View file @
48a98935
...
...
@@ -143,7 +143,12 @@ class BLEU(mx.metric.EvalMetric):
if
self
.
_size_hyp
>=
self
.
_size_ref
:
return
1
else
:
return
math
.
exp
(
1
-
(
self
.
_size_ref
/
self
.
_size_hyp
))
if
self
.
_size_hyp
>
0
:
size_hyp
=
self
.
_size_hyp
else
:
size_hyp
=
1
return
math
.
exp
(
1
-
(
self
.
_size_ref
/
size_hyp
))
@
staticmethod
def
_get_ngrams
(
sentence
,
n
):
...
...
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