Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
languages
CNNTrainLang
Commits
687465cb
Commit
687465cb
authored
Jan 31, 2020
by
Julian Treiber
Browse files
added batch_axis parameter for CrossEntropy losses
parent
c0f3254a
Pipeline
#235630
passed with stages
in 7 minutes and 58 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/main/grammars/de/monticore/lang/monticar/CNNTrain.mc4
View file @
687465cb
...
...
@@ -108,6 +108,7 @@ grammar CNNTrain extends de.monticore.lang.monticar.Common2, de.monticore.Number
SparseLabelEntry
implements
CrossEntropyEntry
,
SoftmaxCrossEntropyEntry
,
SoftmaxCrossEntropyIgnoreIndicesEntry
=
name
:
"sparse_label"
":"
value
:
BooleanValue
;
FromLogitsEntry
implements
SoftmaxCrossEntropyEntry
,
SoftmaxCrossEntropyIgnoreIndicesEntry
,
KullbackLeiblerEntry
=
name
:
"from_logits"
":"
value
:
BooleanValue
;
LossAxisEntry
implements
CrossEntropyEntry
,
SoftmaxCrossEntropyEntry
,
SoftmaxCrossEntropyIgnoreIndicesEntry
=
name
:
"loss_axis"
":"
value
:
IntegerValue
;
BatchAxisEntry
implements
CrossEntropyEntry
,
SoftmaxCrossEntropyEntry
,
SoftmaxCrossEntropyIgnoreIndicesEntry
=
name
:
"batch_axis"
":"
value
:
IntegerValue
;
IgnoreIndicesEntry
implements
SoftmaxCrossEntropyIgnoreIndicesEntry
=
name
:
"ignore_indices"
":"
value
:
IntegerValue
;
MarginEntry
implements
HingeEntry
,
SquaredHingeEntry
=
name
:
"margin"
":"
value
:
NumberValue
;
LabelFormatEntry
implements
LogisticEntry
=
name
:
"label_format"
":"
value
:
StringValue
;
...
...
src/main/java/de/monticore/lang/monticar/cnntrain/_cocos/ParameterAlgorithmMapping.java
View file @
687465cb
...
...
@@ -48,6 +48,7 @@ class ParameterAlgorithmMapping {
ASTLossWeightsEntry
.
class
,
ASTSparseLabelEntry
.
class
,
ASTLossAxisEntry
.
class
,
ASTBatchAxisEntry
.
class
,
ASTFromLogitsEntry
.
class
,
ASTIgnoreIndicesEntry
.
class
,
ASTMarginEntry
.
class
,
...
...
src/test/resources/valid_tests/FullConfig.cnnt
View file @
687465cb
...
...
@@ -8,6 +8,7 @@ configuration FullConfig{
sparse_label: true
from_logits: true
loss_axis : -1
batch_axis: 0
}
context : gpu
normalize : true
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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