Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
CNNTrainLang
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
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
languages
CNNTrainLang
Commits
2326a7fb
Commit
2326a7fb
authored
Feb 02, 2020
by
Julian Treiber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added entries dice loss
parent
687465cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
4 deletions
+39
-4
src/main/grammars/de/monticore/lang/monticar/CNNTrain.mc4
src/main/grammars/de/monticore/lang/monticar/CNNTrain.mc4
+8
-4
src/main/java/de/monticore/lang/monticar/cnntrain/_cocos/ParameterAlgorithmMapping.java
...g/monticar/cnntrain/_cocos/ParameterAlgorithmMapping.java
+1
-0
src/test/resources/valid_tests/FullConfig3.cnnt
src/test/resources/valid_tests/FullConfig3.cnnt
+30
-0
No files found.
src/main/grammars/de/monticore/lang/monticar/CNNTrain.mc4
View file @
2326a7fb
...
@@ -91,6 +91,9 @@ grammar CNNTrain extends de.monticore.lang.monticar.Common2, de.monticore.Number
...
@@ -91,6 +91,9 @@ grammar CNNTrain extends de.monticore.lang.monticar.Common2, de.monticore.Number
interface
SoftmaxCrossEntropyIgnoreIndicesEntry
extends
Entry
;
interface
SoftmaxCrossEntropyIgnoreIndicesEntry
extends
Entry
;
SoftmaxCrossEntropyIgnoreIndicesLoss
implements
LossValue
=
name
:
"softmax_cross_entropy_ignore_indices"
(
"{"
params
:
SoftmaxCrossEntropyIgnoreIndicesEntry
*
"}"
)?;
SoftmaxCrossEntropyIgnoreIndicesLoss
implements
LossValue
=
name
:
"softmax_cross_entropy_ignore_indices"
(
"{"
params
:
SoftmaxCrossEntropyIgnoreIndicesEntry
*
"}"
)?;
interface
DiceEntry
extends
Entry
;
DiceLoss
implements
LossValue
=
name
:
"dice_loss"
(
"{"
params
:
DiceEntry
*
"}"
)?;
SigmoidBinaryCrossEntropyLoss
implements
LossValue
=
name
:
"sigmoid_binary_cross_entropy"
(
"{"
params
:
Entry
*
"}"
)?;
SigmoidBinaryCrossEntropyLoss
implements
LossValue
=
name
:
"sigmoid_binary_cross_entropy"
(
"{"
params
:
Entry
*
"}"
)?;
interface
HingeEntry
extends
Entry
;
interface
HingeEntry
extends
Entry
;
...
@@ -105,13 +108,14 @@ grammar CNNTrain extends de.monticore.lang.monticar.Common2, de.monticore.Number
...
@@ -105,13 +108,14 @@ grammar CNNTrain extends de.monticore.lang.monticar.Common2, de.monticore.Number
interface
KullbackLeiblerEntry
extends
Entry
;
interface
KullbackLeiblerEntry
extends
Entry
;
KullbackLeiblerLoss
implements
LossValue
=
name
:
"kullback_leibler"
(
"{"
params
:
KullbackLeiblerEntry
*
"}"
)?;
KullbackLeiblerLoss
implements
LossValue
=
name
:
"kullback_leibler"
(
"{"
params
:
KullbackLeiblerEntry
*
"}"
)?;
SparseLabelEntry
implements
CrossEntropyEntry
,
SoftmaxCrossEntropyEntry
,
SoftmaxCrossEntropyIgnoreIndicesEntry
=
name
:
"sparse_label"
":"
value
:
BooleanValue
;
SparseLabelEntry
implements
CrossEntropyEntry
,
SoftmaxCrossEntropyEntry
,
SoftmaxCrossEntropyIgnoreIndicesEntry
,
DiceEntry
=
name
:
"sparse_label"
":"
value
:
BooleanValue
;
FromLogitsEntry
implements
SoftmaxCrossEntropyEntry
,
SoftmaxCrossEntropyIgnoreIndicesEntry
,
KullbackLeiblerEntry
=
name
:
"from_logits"
":"
value
:
BooleanValue
;
FromLogitsEntry
implements
SoftmaxCrossEntropyEntry
,
SoftmaxCrossEntropyIgnoreIndicesEntry
,
KullbackLeiblerEntry
,
DiceEntry
=
name
:
"from_logits"
":"
value
:
BooleanValue
;
LossAxisEntry
implements
CrossEntropyEntry
,
SoftmaxCrossEntropyEntry
,
SoftmaxCrossEntropyIgnoreIndicesEntry
=
name
:
"loss_axis"
":"
value
:
IntegerValue
;
LossAxisEntry
implements
CrossEntropyEntry
,
SoftmaxCrossEntropyEntry
,
SoftmaxCrossEntropyIgnoreIndicesEntry
,
DiceEntry
=
name
:
"loss_axis"
":"
value
:
IntegerValue
;
BatchAxisEntry
implements
CrossEntropyEntry
,
SoftmaxCrossEntropyEntry
,
SoftmaxCrossEntropyIgnoreIndicesEntry
=
name
:
"batch_axis"
":"
value
:
IntegerValue
;
BatchAxisEntry
implements
CrossEntropyEntry
,
SoftmaxCrossEntropyEntry
,
SoftmaxCrossEntropyIgnoreIndicesEntry
,
DiceEntry
=
name
:
"batch_axis"
":"
value
:
IntegerValue
;
IgnoreIndicesEntry
implements
SoftmaxCrossEntropyIgnoreIndicesEntry
=
name
:
"ignore_indices"
":"
value
:
IntegerValue
;
IgnoreIndicesEntry
implements
SoftmaxCrossEntropyIgnoreIndicesEntry
=
name
:
"ignore_indices"
":"
value
:
IntegerValue
;
MarginEntry
implements
HingeEntry
,
SquaredHingeEntry
=
name
:
"margin"
":"
value
:
NumberValue
;
MarginEntry
implements
HingeEntry
,
SquaredHingeEntry
=
name
:
"margin"
":"
value
:
NumberValue
;
LabelFormatEntry
implements
LogisticEntry
=
name
:
"label_format"
":"
value
:
StringValue
;
LabelFormatEntry
implements
LogisticEntry
=
name
:
"label_format"
":"
value
:
StringValue
;
//
DiceWeight
implements
DiceEntry
=
name
:
"dice_weight"
":"
value
:
DoubleVectorValue
;
interface
OptimizerValue
extends
ConfigValue
;
interface
OptimizerValue
extends
ConfigValue
;
interface
SGDEntry
extends
OptimizerParamEntry
;
interface
SGDEntry
extends
OptimizerParamEntry
;
...
...
src/main/java/de/monticore/lang/monticar/cnntrain/_cocos/ParameterAlgorithmMapping.java
View file @
2326a7fb
...
@@ -51,6 +51,7 @@ class ParameterAlgorithmMapping {
...
@@ -51,6 +51,7 @@ class ParameterAlgorithmMapping {
ASTBatchAxisEntry
.
class
,
ASTBatchAxisEntry
.
class
,
ASTFromLogitsEntry
.
class
,
ASTFromLogitsEntry
.
class
,
ASTIgnoreIndicesEntry
.
class
,
ASTIgnoreIndicesEntry
.
class
,
//ASTDiceWeightEntry.class,
ASTMarginEntry
.
class
,
ASTMarginEntry
.
class
,
ASTLabelFormatEntry
.
class
,
ASTLabelFormatEntry
.
class
,
ASTRhoEntry
.
class
,
ASTRhoEntry
.
class
,
...
...
src/test/resources/valid_tests/FullConfig3.cnnt
0 → 100644
View file @
2326a7fb
/* (c) https://github.com/MontiCore/monticore */
configuration FullConfig{
num_epoch : 5
batch_size : 100
load_checkpoint : true
eval_metric : mse
loss: dice_loss{
sparse_label: true
from_logits: true
loss_axis : -1
batch_axis: 0
}
context : gpu
normalize : true
optimizer : rmsprop{
learning_rate : 0.001
learning_rate_minimum : 0.00001
weight_decay : 0.01
learning_rate_decay : 0.9
learning_rate_policy : step
step_size : 1000
rescale_grad : 1.1
clip_gradient : 10
gamma1 : 0.9
gamma2 : 0.9
epsilon : 0.000001
centered : true
clip_weights : 10
}
}
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