Commit c0f3254a authored by Julian Treiber's avatar Julian Treiber

added parameter loss axis for CrossEntropy losses

parent 7574b6e6
Pipeline #235251 passed with stages
in 7 minutes and 29 seconds
......@@ -107,6 +107,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;
IgnoreIndicesEntry implements SoftmaxCrossEntropyIgnoreIndicesEntry = name:"ignore_indices" ":" value:IntegerValue;
MarginEntry implements HingeEntry, SquaredHingeEntry = name:"margin" ":" value:NumberValue;
LabelFormatEntry implements LogisticEntry = name:"label_format" ":" value:StringValue;
......
......@@ -47,6 +47,7 @@ class ParameterAlgorithmMapping {
ASTLossEntry.class,
ASTLossWeightsEntry.class,
ASTSparseLabelEntry.class,
ASTLossAxisEntry.class,
ASTFromLogitsEntry.class,
ASTIgnoreIndicesEntry.class,
ASTMarginEntry.class,
......
......@@ -7,6 +7,7 @@ configuration FullConfig{
loss: softmax_cross_entropy{
sparse_label: true
from_logits: true
loss_axis : -1
}
context : gpu
normalize : true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment