Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
CNNArch2Gluon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
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
Package Registry
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
CNNArch2Gluon
Commits
1cfd7cf9
Commit
1cfd7cf9
authored
Feb 06, 2020
by
Julian Treiber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed illegal parameter in dice_loss
parent
0f841c73
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
11 additions
and
23 deletions
+11
-23
src/main/resources/templates/gluon/CNNSupervisedTrainer.ftl
src/main/resources/templates/gluon/CNNSupervisedTrainer.ftl
+1
-2
src/test/resources/target_code/CNNSupervisedTrainer_Alexnet.py
...est/resources/target_code/CNNSupervisedTrainer_Alexnet.py
+0
-1
src/test/resources/target_code/CNNSupervisedTrainer_CifarClassifierNetwork.py
...arget_code/CNNSupervisedTrainer_CifarClassifierNetwork.py
+1
-2
src/test/resources/target_code/CNNSupervisedTrainer_Invariant.py
...t/resources/target_code/CNNSupervisedTrainer_Invariant.py
+1
-2
src/test/resources/target_code/CNNSupervisedTrainer_MultipleStreams.py
...urces/target_code/CNNSupervisedTrainer_MultipleStreams.py
+1
-2
src/test/resources/target_code/CNNSupervisedTrainer_RNNencdec.py
...t/resources/target_code/CNNSupervisedTrainer_RNNencdec.py
+1
-2
src/test/resources/target_code/CNNSupervisedTrainer_RNNsearch.py
...t/resources/target_code/CNNSupervisedTrainer_RNNsearch.py
+1
-2
src/test/resources/target_code/CNNSupervisedTrainer_RNNtest.py
...est/resources/target_code/CNNSupervisedTrainer_RNNtest.py
+1
-2
src/test/resources/target_code/CNNSupervisedTrainer_ResNeXt50.py
...t/resources/target_code/CNNSupervisedTrainer_ResNeXt50.py
+1
-2
src/test/resources/target_code/CNNSupervisedTrainer_Show_attend_tell.py
...rces/target_code/CNNSupervisedTrainer_Show_attend_tell.py
+1
-2
src/test/resources/target_code/CNNSupervisedTrainer_ThreeInputCNN_M14.py
...ces/target_code/CNNSupervisedTrainer_ThreeInputCNN_M14.py
+1
-2
src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py
src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py
+1
-2
No files found.
src/main/resources/templates/gluon/CNNSupervisedTrainer.ftl
View file @
1cfd7cf9
...
...
@@ -296,9 +296,8 @@ class ${tc.fileNameWithoutEnding}:
elif loss == 'cross_entropy':
loss_function = CrossEntropyLoss(axis=loss_axis, sparse_label=sparseLabel, batch_axis=batch_axis)
elif loss == 'dice_loss':
fromLogits = loss_params['from_logits'] if 'from_logits' in loss_params else False
dice_weight = loss_params['dice_weight'] if 'dice_weight' in loss_params else None
loss_function = DiceLoss(axis=loss_axis,
from_logits=fromLogits,
weight=dice_weight, sparse_label=sparseLabel, batch_axis=batch_axis)
loss_function = DiceLoss(axis=loss_axis, weight=dice_weight, sparse_label=sparseLabel, batch_axis=batch_axis)
elif loss == 'l2':
loss_function = mx.gluon.loss.L2Loss()
elif loss == 'l1':
...
...
src/test/resources/target_code/CNNSupervisedTrainer_Alexnet.py
View file @
1cfd7cf9
...
...
@@ -295,7 +295,6 @@ class CNNSupervisedTrainer_Alexnet:
elif
loss
==
'cross_entropy'
:
loss_function
=
CrossEntropyLoss
(
axis
=
loss_axis
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'dice_loss'
:
fromLogits
=
loss_params
[
'from_logits'
]
if
'from_logits'
in
loss_params
else
False
dice_weight
=
loss_params
[
'dice_weight'
]
if
'dice_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'l2'
:
...
...
src/test/resources/target_code/CNNSupervisedTrainer_CifarClassifierNetwork.py
View file @
1cfd7cf9
...
...
@@ -295,9 +295,8 @@ class CNNSupervisedTrainer_CifarClassifierNetwork:
elif
loss
==
'cross_entropy'
:
loss_function
=
CrossEntropyLoss
(
axis
=
loss_axis
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'dice_loss'
:
fromLogits
=
loss_params
[
'from_logits'
]
if
'from_logits'
in
loss_params
else
False
dice_weight
=
loss_params
[
'dice_weight'
]
if
'dice_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
from_logits
=
fromLogits
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'l2'
:
loss_function
=
mx
.
gluon
.
loss
.
L2Loss
()
elif
loss
==
'l1'
:
...
...
src/test/resources/target_code/CNNSupervisedTrainer_Invariant.py
View file @
1cfd7cf9
...
...
@@ -288,9 +288,8 @@ class CNNSupervisedTrainer_Invariant:
elif
loss
==
'cross_entropy'
:
loss_function
=
CrossEntropyLoss
(
axis
=
loss_axis
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'dice_loss'
:
fromLogits
=
loss_params
[
'from_logits'
]
if
'from_logits'
in
loss_params
else
False
dice_weight
=
loss_params
[
'dice_weight'
]
if
'dice_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
from_logits
=
fromLogits
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'l2'
:
loss_function
=
mx
.
gluon
.
loss
.
L2Loss
()
elif
loss
==
'l1'
:
...
...
src/test/resources/target_code/CNNSupervisedTrainer_MultipleStreams.py
View file @
1cfd7cf9
...
...
@@ -288,9 +288,8 @@ class CNNSupervisedTrainer_MultipleStreams:
elif
loss
==
'cross_entropy'
:
loss_function
=
CrossEntropyLoss
(
axis
=
loss_axis
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'dice_loss'
:
fromLogits
=
loss_params
[
'from_logits'
]
if
'from_logits'
in
loss_params
else
False
dice_weight
=
loss_params
[
'dice_weight'
]
if
'dice_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
from_logits
=
fromLogits
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'l2'
:
loss_function
=
mx
.
gluon
.
loss
.
L2Loss
()
elif
loss
==
'l1'
:
...
...
src/test/resources/target_code/CNNSupervisedTrainer_RNNencdec.py
View file @
1cfd7cf9
...
...
@@ -288,9 +288,8 @@ class CNNSupervisedTrainer_RNNencdec:
elif
loss
==
'cross_entropy'
:
loss_function
=
CrossEntropyLoss
(
axis
=
loss_axis
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'dice_loss'
:
fromLogits
=
loss_params
[
'from_logits'
]
if
'from_logits'
in
loss_params
else
False
dice_weight
=
loss_params
[
'dice_weight'
]
if
'dice_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
from_logits
=
fromLogits
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'l2'
:
loss_function
=
mx
.
gluon
.
loss
.
L2Loss
()
elif
loss
==
'l1'
:
...
...
src/test/resources/target_code/CNNSupervisedTrainer_RNNsearch.py
View file @
1cfd7cf9
...
...
@@ -288,9 +288,8 @@ class CNNSupervisedTrainer_RNNsearch:
elif
loss
==
'cross_entropy'
:
loss_function
=
CrossEntropyLoss
(
axis
=
loss_axis
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'dice_loss'
:
fromLogits
=
loss_params
[
'from_logits'
]
if
'from_logits'
in
loss_params
else
False
dice_weight
=
loss_params
[
'dice_weight'
]
if
'dice_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
from_logits
=
fromLogits
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'l2'
:
loss_function
=
mx
.
gluon
.
loss
.
L2Loss
()
elif
loss
==
'l1'
:
...
...
src/test/resources/target_code/CNNSupervisedTrainer_RNNtest.py
View file @
1cfd7cf9
...
...
@@ -288,9 +288,8 @@ class CNNSupervisedTrainer_RNNtest:
elif
loss
==
'cross_entropy'
:
loss_function
=
CrossEntropyLoss
(
axis
=
loss_axis
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'dice_loss'
:
fromLogits
=
loss_params
[
'from_logits'
]
if
'from_logits'
in
loss_params
else
False
dice_weight
=
loss_params
[
'dice_weight'
]
if
'dice_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
from_logits
=
fromLogits
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'l2'
:
loss_function
=
mx
.
gluon
.
loss
.
L2Loss
()
elif
loss
==
'l1'
:
...
...
src/test/resources/target_code/CNNSupervisedTrainer_ResNeXt50.py
View file @
1cfd7cf9
...
...
@@ -288,9 +288,8 @@ class CNNSupervisedTrainer_ResNeXt50:
elif
loss
==
'cross_entropy'
:
loss_function
=
CrossEntropyLoss
(
axis
=
loss_axis
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'dice_loss'
:
fromLogits
=
loss_params
[
'from_logits'
]
if
'from_logits'
in
loss_params
else
False
dice_weight
=
loss_params
[
'dice_weight'
]
if
'dice_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
from_logits
=
fromLogits
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'l2'
:
loss_function
=
mx
.
gluon
.
loss
.
L2Loss
()
elif
loss
==
'l1'
:
...
...
src/test/resources/target_code/CNNSupervisedTrainer_Show_attend_tell.py
View file @
1cfd7cf9
...
...
@@ -288,9 +288,8 @@ class CNNSupervisedTrainer_Show_attend_tell:
elif
loss
==
'cross_entropy'
:
loss_function
=
CrossEntropyLoss
(
axis
=
loss_axis
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'dice_loss'
:
fromLogits
=
loss_params
[
'from_logits'
]
if
'from_logits'
in
loss_params
else
False
dice_weight
=
loss_params
[
'dice_weight'
]
if
'dice_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
from_logits
=
fromLogits
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'l2'
:
loss_function
=
mx
.
gluon
.
loss
.
L2Loss
()
elif
loss
==
'l1'
:
...
...
src/test/resources/target_code/CNNSupervisedTrainer_ThreeInputCNN_M14.py
View file @
1cfd7cf9
...
...
@@ -288,9 +288,8 @@ class CNNSupervisedTrainer_ThreeInputCNN_M14:
elif
loss
==
'cross_entropy'
:
loss_function
=
CrossEntropyLoss
(
axis
=
loss_axis
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'dice_loss'
:
fromLogits
=
loss_params
[
'from_logits'
]
if
'from_logits'
in
loss_params
else
False
dice_weight
=
loss_params
[
'dice_weight'
]
if
'dice_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
from_logits
=
fromLogits
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'l2'
:
loss_function
=
mx
.
gluon
.
loss
.
L2Loss
()
elif
loss
==
'l1'
:
...
...
src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py
View file @
1cfd7cf9
...
...
@@ -295,9 +295,8 @@ class CNNSupervisedTrainer_VGG16:
elif
loss
==
'cross_entropy'
:
loss_function
=
CrossEntropyLoss
(
axis
=
loss_axis
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'dice_loss'
:
fromLogits
=
loss_params
[
'from_logits'
]
if
'from_logits'
in
loss_params
else
False
dice_weight
=
loss_params
[
'dice_weight'
]
if
'dice_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
from_logits
=
fromLogits
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
dice_weight
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'l2'
:
loss_function
=
mx
.
gluon
.
loss
.
L2Loss
()
elif
loss
==
'l1'
:
...
...
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