|
|
@@ -4,6 +4,7 @@ import platform
|
|
|
|
|
|
from chainer_addons.training import OptimizerType
|
|
|
from chainer_addons.models import PrepareType
|
|
|
+from chainer_addons.links import PoolingType
|
|
|
|
|
|
from cvargparse import GPUParser, Arg, ArgFactory
|
|
|
from cvdatasets.utils import read_info_file
|
|
|
@@ -29,6 +30,9 @@ def default_factory(extra_list=[]):
|
|
|
PrepareType.as_arg("prepare_type",
|
|
|
help_text="type of image preprocessing"),
|
|
|
|
|
|
+ PoolingType.as_arg("pooling",
|
|
|
+ help_text="type of pre-classification pooling"),
|
|
|
+
|
|
|
Arg("--load", type=str, help="ignore weights and load already fine-tuned model"),
|
|
|
|
|
|
Arg("--n_jobs", "-j", type=int, default=0,
|
|
|
@@ -39,8 +43,9 @@ def default_factory(extra_list=[]):
|
|
|
OptimizerType.as_arg("optimizer", "opt",
|
|
|
help_text="type of the optimizer"),
|
|
|
|
|
|
- Arg("--cosine_schedule", action="store_true",
|
|
|
- help="enable cosine annealing LR schedule"),
|
|
|
+ Arg("--cosine_schedule", type=int,
|
|
|
+ default=-1,
|
|
|
+ help="enable cosine annealing LR schedule. This parameter sets the number of schedule stages"),
|
|
|
|
|
|
Arg("--l1_loss", action="store_true",
|
|
|
help="(only with \"--only_head\" option!) use L1 Hinge Loss instead of Softmax Cross-Entropy"),
|