Add num_epoch and eval_metric training parameters to the CNNTrainer.ftl...

Add num_epoch and eval_metric training parameters to the CNNTrainer.ftl template and correct target code for corresponding test
parent 7b249ebb
Pipeline #69755 failed with stages
......@@ -16,6 +16,9 @@ if __name__ == "__main__":
<#if (config.batchSize)??>
batch_size = ${config.batchSize},
</#if>
<#if (config.numEpoch)??>
num_epoch = ${config.numEpoch},
</#if>
<#if (config.loadCheckpoint)??>
load_checkpoint = ${config.loadCheckpoint?string("True","False")},
</#if>
......@@ -25,6 +28,9 @@ if __name__ == "__main__":
<#if (config.normalize)??>
normalize = ${config.normalize?string("True","False")},
</#if>
<#if (config.evalMetric)??>
eval_metric = ${config.evalMetric},
</#if>
<#if (config.configuration.optimizer)??>
optimizer = '${config.optimizerName}',
optimizer_params = {
......
......@@ -12,6 +12,7 @@ if __name__ == "__main__":
main_net1 = CNNCreator_main_net1.CNNCreator_main_net1()
main_net1.train(
batch_size = 64,
num_epoch = 10,
load_checkpoint = False,
context = 'gpu',
normalize = True,
......@@ -25,6 +26,7 @@ if __name__ == "__main__":
main_net2 = CNNCreator_main_net2.CNNCreator_main_net2()
main_net2.train(
batch_size = 32,
num_epoch = 10,
load_checkpoint = False,
context = 'gpu',
normalize = True,
......
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