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
aedd1e5b
Commit
aedd1e5b
authored
Jul 17, 2018
by
Svetlana Pavlitskaya
Browse files
added EvalMetric to template
parent
2ff77c84
Pipeline
#63452
passed with stages
in 1 minute and 51 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/monticar/cnntrain/generator/CNNTrainTemplateController.java
View file @
aedd1e5b
...
...
@@ -111,6 +111,13 @@ public class CNNTrainTemplateController {
return
getConfiguration
().
getEntry
(
"context"
).
getValue
().
toString
();
}
public
String
getEvalMetric
()
{
if
(!
getConfiguration
().
getEntryMap
().
containsKey
(
"eval_metric"
))
{
return
null
;
}
return
getConfiguration
().
getEntry
(
"eval_metric"
).
getValue
().
toString
();
}
public
String
getOptimizerName
()
{
if
(
getConfiguration
().
getOptimizer
()
==
null
)
{
return
null
;
...
...
src/main/resources/templates/Config.ftl
View file @
aedd1e5b
...
...
@@ -13,6 +13,9 @@ context = '${tc.context}',
<#
if
(tc.normalize)??>
normalize
=
$
{
tc
.normalize
?
string
(
"True"
,
"False"
)}
,
</#
if
>
<#
if
(tc.evalMetric)??>
eval_metric
=
'$
{
tc
.evalMetric
}
',
</#
if
>
<#
if
(tc.configuration.optimizer)??>
optimizer
=
'$
{
tc
.optimizerName
}
',
optimizer_params
=
{
...
...
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