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
4e8f206e
Commit
4e8f206e
authored
Feb 27, 2020
by
Julian Treiber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjusted weights for adding loss_weight
parent
4145955b
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
22 additions
and
22 deletions
+22
-22
src/test/resources/target_code/CNNSupervisedTrainer_Alexnet.py
...est/resources/target_code/CNNSupervisedTrainer_Alexnet.py
+2
-2
src/test/resources/target_code/CNNSupervisedTrainer_CifarClassifierNetwork.py
...arget_code/CNNSupervisedTrainer_CifarClassifierNetwork.py
+2
-2
src/test/resources/target_code/CNNSupervisedTrainer_Invariant.py
...t/resources/target_code/CNNSupervisedTrainer_Invariant.py
+2
-2
src/test/resources/target_code/CNNSupervisedTrainer_MultipleStreams.py
...urces/target_code/CNNSupervisedTrainer_MultipleStreams.py
+2
-2
src/test/resources/target_code/CNNSupervisedTrainer_RNNencdec.py
...t/resources/target_code/CNNSupervisedTrainer_RNNencdec.py
+2
-2
src/test/resources/target_code/CNNSupervisedTrainer_RNNsearch.py
...t/resources/target_code/CNNSupervisedTrainer_RNNsearch.py
+2
-2
src/test/resources/target_code/CNNSupervisedTrainer_RNNtest.py
...est/resources/target_code/CNNSupervisedTrainer_RNNtest.py
+2
-2
src/test/resources/target_code/CNNSupervisedTrainer_ResNeXt50.py
...t/resources/target_code/CNNSupervisedTrainer_ResNeXt50.py
+2
-2
src/test/resources/target_code/CNNSupervisedTrainer_Show_attend_tell.py
...rces/target_code/CNNSupervisedTrainer_Show_attend_tell.py
+2
-2
src/test/resources/target_code/CNNSupervisedTrainer_ThreeInputCNN_M14.py
...ces/target_code/CNNSupervisedTrainer_ThreeInputCNN_M14.py
+2
-2
src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py
src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py
+2
-2
No files found.
src/test/resources/target_code/CNNSupervisedTrainer_Alexnet.py
View file @
4e8f206e
...
...
@@ -295,8 +295,8 @@ class CNNSupervisedTrainer_Alexnet:
elif
loss
==
'cross_entropy'
:
loss_function
=
CrossEntropyLoss
(
axis
=
loss_axis
,
sparse_label
=
sparseLabel
,
batch_axis
=
batch_axis
)
elif
loss
==
'dice_loss'
:
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
)
loss_weight
=
loss_params
[
'loss_weight'
]
if
'loss
_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
loss
_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_CifarClassifierNetwork.py
View file @
4e8f206e
...
...
@@ -295,8 +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'
:
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
)
loss_weight
=
loss_params
[
'loss_weight'
]
if
'loss
_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
loss
_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 @
4e8f206e
...
...
@@ -288,8 +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'
:
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
)
loss_weight
=
loss_params
[
'loss_weight'
]
if
'loss
_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
loss
_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 @
4e8f206e
...
...
@@ -288,8 +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'
:
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
)
loss_weight
=
loss_params
[
'loss_weight'
]
if
'loss
_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
loss
_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 @
4e8f206e
...
...
@@ -288,8 +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'
:
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
)
loss_weight
=
loss_params
[
'loss_weight'
]
if
'loss
_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
loss
_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 @
4e8f206e
...
...
@@ -288,8 +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'
:
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
)
loss_weight
=
loss_params
[
'loss_weight'
]
if
'loss
_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
loss
_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 @
4e8f206e
...
...
@@ -288,8 +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'
:
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
)
loss_weight
=
loss_params
[
'loss_weight'
]
if
'loss
_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
loss
_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 @
4e8f206e
...
...
@@ -288,8 +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'
:
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
)
loss_weight
=
loss_params
[
'loss_weight'
]
if
'loss
_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
loss
_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 @
4e8f206e
...
...
@@ -288,8 +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'
:
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
)
loss_weight
=
loss_params
[
'loss_weight'
]
if
'loss
_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
loss
_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 @
4e8f206e
...
...
@@ -288,8 +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'
:
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
)
loss_weight
=
loss_params
[
'loss_weight'
]
if
'loss
_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
loss
_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 @
4e8f206e
...
...
@@ -295,8 +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'
:
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
)
loss_weight
=
loss_params
[
'loss_weight'
]
if
'loss
_weight'
in
loss_params
else
None
loss_function
=
DiceLoss
(
axis
=
loss_axis
,
weight
=
loss
_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