CNNTrain.mc4 817 Bytes
Newer Older
Thomas Michael Timmermanns's avatar
Thomas Michael Timmermanns committed
1
package de.monticore.lang.monticar;
Thomas Michael Timmermanns's avatar
Thomas Michael Timmermanns committed
2

3
grammar CNNTrain extends de.monticore.lang.math.Math {
Thomas Michael Timmermanns's avatar
Thomas Michael Timmermanns committed
4

Thomas Michael Timmermanns's avatar
Thomas Michael Timmermanns committed
5
    symbol scope CNNTrainCompilationUnit = "Configuration" name:Name& "{" TrainingConfiguration "}";
6

Thomas Michael Timmermanns's avatar
Thomas Michael Timmermanns committed
7
    TrainingConfiguration = (assignments:ParameterAssignment)*;
8 9

    ParameterAssignment = lhs:TrainingParameter "=" rhs:ParameterRhs;
Thomas Michael Timmermanns's avatar
Thomas Michael Timmermanns committed
10 11 12 13 14 15
    enum TrainingParameter = DATA:"data"
                           | LABELS:"labels"
                           | EPOCHS:"epochs"
                           | BATCHSIZE:"batch_size"
                           | OPTIMIZER:"optimizer"
                           | LEARNINGRATE:"learning_rate";
Thomas Michael Timmermanns's avatar
Thomas Michael Timmermanns committed
16 17
                           //eval_metric
                           //validation_split
Thomas Michael Timmermanns's avatar
Thomas Michael Timmermanns committed
18

19
    ParameterRhs = stringVal:String
20 21
                 | number:Number
                 | refOrBool:Name;
Thomas Michael Timmermanns's avatar
Thomas Michael Timmermanns committed
22 23

}