CNNTrain.mc4 693 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
4

grammar CNNTrain extends de.monticore.common.Common {

5
6
7
    symbol scope Configuration = "training" name:Name&
                                 "{" (assignments:ParameterAssignment)+ "}";

Thomas Michael Timmermanns's avatar
Thomas Michael Timmermanns committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
    ParameterAssignment = lhs:TrainingParameter "=" rhs:Rhs;
    enum TrainingParameter = DATA:"data"
                           | LABELS:"labels"
                           | EPOCHS:"epochs"
                           | BATCHSIZE:"batch_size"
                           | OPTIMIZER:"optimizer"
                           | LEARNINGRATE:"learning_rate";



    Rhs = stringVal:String
        | intVal:Num_Int
        | doubleVal:Num_Double
        | refOrBool:Name;

}