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
6f050c35
Commit
6f050c35
authored
Jun 05, 2019
by
Eyüp Harputlu
Browse files
update and adapt to newest merges
parent
fd32e1c9
Pipeline
#147434
passed with stages
in 7 minutes and 13 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/grammars/de/monticore/lang/monticar/CNNTrain.mc4
View file @
6f050c35
...
...
@@ -51,12 +51,6 @@ grammar CNNTrain extends de.monticore.lang.monticar.Common2, de.monticore.Number
interface
OptimizerParamEntry
extends
Entry
;
DataVariable
implements
VariableReference
=
Name
&;
IntegerValue
implements
ConfigValue
=
NumberWithUnit
;
NumberValue
implements
ConfigValue
=
NumberWithUnit
;
StringValue
implements
ConfigValue
=
StringLiteral
;
BooleanValue
implements
ConfigValue
=
(
TRUE
:
"true"
|
FALSE
:
"false"
);
interface
LossValue
extends
ConfigValue
;
L1Loss
implements
LossValue
=
name
:
"l1"
(
"{"
params
:
Entry
*
"}"
)?;
...
...
src/main/java/de/monticore/lang/monticar/cnntrain/_cocos/CheckLearningParameterCombination.java
View file @
6f050c35
...
...
@@ -34,88 +34,6 @@ import java.util.Set;
*
*/
public
class
CheckLearningParameterCombination
implements
CNNTrainASTEntryCoCo
{
private
final
static
List
<
Class
>
ALLOWED_SUPERVISED_LEARNING
=
Lists
.
newArrayList
(
ASTTrainContextEntry
.
class
,
ASTBatchSizeEntry
.
class
,
ASTOptimizerEntry
.
class
,
ASTLearningRateEntry
.
class
,
ASTLoadCheckpointEntry
.
class
,
ASTEvalMetricEntry
.
class
,
ASTLossEntry
.
class
,
ASTSparseLabelEntry
.
class
,
ASTFromLogitsEntry
.
class
,
ASTMarginEntry
.
class
,
ASTLabelFormatEntry
.
class
,
ASTRhoEntry
.
class
,
ASTNormalizeEntry
.
class
,
ASTMinimumLearningRateEntry
.
class
,
ASTLRDecayEntry
.
class
,
ASTWeightDecayEntry
.
class
,
ASTLRPolicyEntry
.
class
,
ASTStepSizeEntry
.
class
,
ASTRescaleGradEntry
.
class
,
ASTClipGradEntry
.
class
,
ASTGamma1Entry
.
class
,
ASTGamma2Entry
.
class
,
ASTEpsilonEntry
.
class
,
ASTCenteredEntry
.
class
,
ASTClipWeightsEntry
.
class
,
ASTBeta1Entry
.
class
,
ASTBeta2Entry
.
class
,
ASTNumEpochEntry
.
class
);
private
final
static
List
<
Class
>
ALLOWED_REINFORCEMENT_LEARNING
=
Lists
.
newArrayList
(
ASTTrainContextEntry
.
class
,
ASTRLAlgorithmEntry
.
class
,
ASTCriticNetworkEntry
.
class
,
ASTOptimizerEntry
.
class
,
ASTRewardFunctionEntry
.
class
,
ASTMinimumLearningRateEntry
.
class
,
ASTLRDecayEntry
.
class
,
ASTWeightDecayEntry
.
class
,
ASTLRPolicyEntry
.
class
,
ASTGamma1Entry
.
class
,
ASTGamma2Entry
.
class
,
ASTEpsilonEntry
.
class
,
ASTClipGradEntry
.
class
,
ASTRescaleGradEntry
.
class
,
ASTStepSizeEntry
.
class
,
ASTCenteredEntry
.
class
,
ASTClipWeightsEntry
.
class
,
ASTLearningRateEntry
.
class
,
ASTDiscountFactorEntry
.
class
,
ASTNumMaxStepsEntry
.
class
,
ASTTargetScoreEntry
.
class
,
ASTTrainingIntervalEntry
.
class
,
ASTUseFixTargetNetworkEntry
.
class
,
ASTTargetNetworkUpdateIntervalEntry
.
class
,
ASTSnapshotIntervalEntry
.
class
,
ASTAgentNameEntry
.
class
,
ASTGymEnvironmentNameEntry
.
class
,
ASTEnvironmentEntry
.
class
,
ASTUseDoubleDQNEntry
.
class
,
ASTLossEntry
.
class
,
ASTSparseLabelEntry
.
class
,
ASTFromLogitsEntry
.
class
,
ASTMarginEntry
.
class
,
ASTLabelFormatEntry
.
class
,
ASTRhoEntry
.
class
,
ASTReplayMemoryEntry
.
class
,
ASTMemorySizeEntry
.
class
,
ASTSampleSizeEntry
.
class
,
ASTActionSelectionEntry
.
class
,
ASTGreedyEpsilonEntry
.
class
,
ASTMinEpsilonEntry
.
class
,
ASTEpsilonDecayEntry
.
class
,
ASTEpsilonDecayMethodEntry
.
class
,
ASTNumEpisodesEntry
.
class
,
ASTRosEnvironmentActionTopicEntry
.
class
,
ASTRosEnvironmentStateTopicEntry
.
class
,
ASTRosEnvironmentMetaTopicEntry
.
class
,
ASTRosEnvironmentResetTopicEntry
.
class
,
ASTRosEnvironmentTerminalStateTopicEntry
.
class
,
ASTRosEnvironmentGreetingTopicEntry
.
class
);
private
final
ParameterAlgorithmMapping
parameterAlgorithmMapping
;
private
Set
<
ASTEntry
>
allEntries
;
...
...
src/main/java/de/monticore/lang/monticar/cnntrain/_cocos/ParameterAlgorithmMapping.java
View file @
6f050c35
...
...
@@ -53,7 +53,12 @@ class ParameterAlgorithmMapping {
ASTEvalMetricEntry
.
class
,
ASTNormalizeEntry
.
class
,
ASTNumEpochEntry
.
class
,
ASTLossEntry
.
class
ASTLossEntry
.
class
,
ASTSparseLabelEntry
.
class
,
ASTFromLogitsEntry
.
class
,
ASTMarginEntry
.
class
,
ASTLabelFormatEntry
.
class
,
ASTRhoEntry
.
class
);
private
static
final
List
<
Class
>
GENERAL_REINFORCEMENT_PARAMETERS
=
Lists
.
newArrayList
(
...
...
src/test/resources/invalid_cocos_tests/CheckRosEnvironmentHasOnlyOneRewardSpecification.cnnt
View file @
6f050c35
...
...
@@ -21,7 +21,7 @@ configuration CheckRosEnvironmentHasOnlyOneRewardSpecification {
target_score : 1000
training_interval : 10
loss : huber
_loss
loss : huber
use_fix_target_network : true
target_network_update_interval : 100
...
...
src/test/resources/valid_tests/ReinforcementWithRosReward.cnnt
View file @
6f050c35
...
...
@@ -19,7 +19,7 @@ configuration ReinforcementWithRosReward {
target_score : 1000
training_interval : 10
loss : huber
_loss
loss : huber
use_fix_target_network : true
target_network_update_interval : 100
...
...
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