Aufgrund einer Wartung wird GitLab am 28.09. zwischen 10:00 und 11:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 28.09. between 10:00 and 11:00 am.

inital commit

parents
This diff is collapsed.
This diff is collapsed.
******************************************************************************
MontiCAR Modeling Family, www.se-rwth.de
Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
All rights reserved.
This project is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this project. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************
package de.monticore.lang.montiarc;
grammar CNNTrain extends de.monticore.common.Common {
TrainingConfiguration = "training" name:Name "{" (assignments:ParameterAssignment)+ "}";
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;
}
\ No newline at end of file
/**
*
* ******************************************************************************
* MontiCAR Modeling Family, www.se-rwth.de
* Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
* All rights reserved.
*
* This project is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this project. If not, see <http://www.gnu.org/licenses/>.
* *******************************************************************************
*/
package de.monticore.lang.montiarc.cnntrain._ast;
import java.util.List;
public class ASTTrainingConfiguration extends ASTTrainingConfigurationTOP {
public ASTTrainingConfiguration() {
}
public ASTTrainingConfiguration(String name, List<ASTParameterAssignment> assignments) {
super(name, assignments);
}
public ASTRhs get(String lhsName) {
ASTRhs rhs = null;
lhsName = lhsName.replace("_", "");
for (ASTParameterAssignment assignment : getAssignments()) {
String assignmentLhs = assignment.getLhs().name();
if (assignmentLhs.equalsIgnoreCase(lhsName)) {
rhs = assignment.getRhs();
}
}
return rhs;
}
}
/**
*
* ******************************************************************************
* MontiCAR Modeling Family, www.se-rwth.de
* Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
* All rights reserved.
*
* This project is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this project. If not, see <http://www.gnu.org/licenses/>.
* *******************************************************************************
*/
package de.monticore.lang.montiarc.cnntrain._symboltable;
import de.monticore.symboltable.MutableScope;
import de.monticore.symboltable.ResolvingConfiguration;
import de.monticore.symboltable.SymbolTableCreator;
import java.util.Optional;
public class CNNTrainLanguage extends CNNTrainLanguageTOP {
public static final String FILE_ENDING = "cnnt";
public CNNTrainLanguage() {
super("CNNTrain Language", FILE_ENDING);
}
@Override
protected CNNTrainModelLoader provideModelLoader() {
return new CNNTrainModelLoader(this);
}
@Override
protected void initResolvingFilters() {
super.initResolvingFilters();
}
@Override
public Optional<? extends SymbolTableCreator> getSymbolTableCreator(ResolvingConfiguration resolvingConfiguration, MutableScope mutableScope) {
return null;
}
}
<configuration>
<timestamp key="bySecond" datePattern="yyyy-MM-dd-HHmmss"/>
<!-- this is a console appender -->
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>
%date{yyyy-MM-dd HH:mm:ss} %-7([%level]) %logger{26} %message%n
</pattern>
</encoder>
</appender>
<root level="TRACE">
<appender-ref ref="CONSOLE" />
</root>
</configuration>
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