Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
EMADL2CPP
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
monticore
EmbeddedMontiArc
generators
EMADL2CPP
Commits
b5c12c93
Commit
b5c12c93
authored
Nov 12, 2019
by
Christian Fuß
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed metric for show_attend_tell model to bleu
Former-commit-id:
ea4cada3
parent
40d664e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
src/test/resources/models/showAttendTell/Show_attend_tell.cnnt
...est/resources/models/showAttendTell/Show_attend_tell.cnnt
+1
-1
src/test/resources/target_code/gluon/CNNSupervisedTrainer_mnist_mnistClassifier_net.py
...e/gluon/CNNSupervisedTrainer_mnist_mnistClassifier_net.py
+5
-1
No files found.
src/test/resources/models/showAttendTell/Show_attend_tell.cnnt
View file @
b5c12c93
...
...
@@ -2,7 +2,7 @@ configuration Show_attend_tell{
num_epoch:2
batch_size:2
context:cpu
eval_metric:
accuracy
eval_metric:
bleu
loss:softmax_cross_entropy
save_attention_image:true
optimizer:adam{
...
...
src/test/resources/target_code/gluon/CNNSupervisedTrainer_mnist_mnistClassifier_net.py
View file @
b5c12c93
...
...
@@ -115,8 +115,12 @@ class BLEU(mx.metric.EvalMetric):
i
*=
2
match_counts
=
1
/
i
precisions
[
n
]
=
match_counts
/
counts
if
(
match_counts
/
counts
)
>
0
:
precisions
[
n
]
=
match_counts
/
counts
print
(
precisions
)
print
(
sum
(
map
(
math
.
log
,
precisions
)))
print
(
math
.
exp
(
sum
(
map
(
math
.
log
,
precisions
))
/
self
.
N
))
bleu
=
self
.
_get_brevity_penalty
()
*
math
.
exp
(
sum
(
map
(
math
.
log
,
precisions
))
/
self
.
N
)
return
(
self
.
name
,
bleu
)
...
...
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