Set default value for batch_size in CNNCreator.ftl since training parameters can be empty.

parent 477fea7c
Pipeline #69759 passed with stages
in 2 minutes and 51 seconds
......@@ -105,8 +105,9 @@ class ${tc.fileNameWithoutEnding}:
sys.exit(1)
def train(self, batch_size,
def train(self, batch_size=64,
num_epoch=10,
eval_metric='acc',
optimizer='adam',
optimizer_params=(('learning_rate', 0.001),),
load_checkpoint=True,
......@@ -158,6 +159,7 @@ class ${tc.fileNameWithoutEnding}:
self.module.fit(
train_data=train_iter,
eval_metric=eval_metric,
eval_data=test_iter,
optimizer=optimizer,
optimizer_params=optimizer_params,
......
......@@ -105,8 +105,9 @@ class CNNCreator_Alexnet:
sys.exit(1)
def train(self, batch_size,
def train(self, batch_size=64,
num_epoch=10,
eval_metric='acc',
optimizer='adam',
optimizer_params=(('learning_rate', 0.001),),
load_checkpoint=True,
......@@ -158,6 +159,7 @@ class CNNCreator_Alexnet:
self.module.fit(
train_data=train_iter,
eval_metric=eval_metric,
eval_data=test_iter,
optimizer=optimizer,
optimizer_params=optimizer_params,
......
......@@ -105,8 +105,9 @@ class CNNCreator_CifarClassifierNetwork:
sys.exit(1)
def train(self, batch_size,
def train(self, batch_size=64,
num_epoch=10,
eval_metric='acc',
optimizer='adam',
optimizer_params=(('learning_rate', 0.001),),
load_checkpoint=True,
......@@ -158,6 +159,7 @@ class CNNCreator_CifarClassifierNetwork:
self.module.fit(
train_data=train_iter,
eval_metric=eval_metric,
eval_data=test_iter,
optimizer=optimizer,
optimizer_params=optimizer_params,
......
......@@ -105,8 +105,9 @@ class CNNCreator_VGG16:
sys.exit(1)
def train(self, batch_size,
def train(self, batch_size=64,
num_epoch=10,
eval_metric='acc',
optimizer='adam',
optimizer_params=(('learning_rate', 0.001),),
load_checkpoint=True,
......@@ -158,6 +159,7 @@ class CNNCreator_VGG16:
self.module.fit(
train_data=train_iter,
eval_metric=eval_metric,
eval_data=test_iter,
optimizer=optimizer,
optimizer_params=optimizer_params,
......
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