ysautoml.network.fewshot
Funtional Modules
ysautoml.network.fewshot.mobilenet
ysautoml.network.fewshot.mobilenet
ysautoml.network.fewshot.mobilenet.train_supernet
ysautoml.network.fewshot.mobilenet.train_supernet(**kwargs)
Train a shared-weight SuperNet for few-shot MobileNet search using distributed or single-GPU execution.
Parameters
tag(str): Experiment name for log and checkpoint files.seed(int, default-1): Random seed for reproducibility.thresholds(tuple, default(38, 40)): FLOPs-based sampling thresholds.data_path(str, default"/dataset/ILSVRC2012"): Dataset root directory.save_path(str, default"./SuperNet"): Directory to store logs and checkpoints. Automatically resolved relative to the caller’s working directory.search_space(str, default"proxyless"): Search space type (proxyless,spos, etc.).num_gpus(int, default2): Number of GPUs to use for training.workers(int, default4): Number of dataloader workers.max_epoch(int, default120): Total training epochs.train_batch_size(int, default1024): Training batch size.test_batch_size(int, default256): Validation batch size.learning_rate(float, default0.12): Initial learning rate.momentum(float, default0.9): SGD momentum factor.weight_decay(float, default4e-5): L2 regularization weight.lr_schedule_type(str, default"cosine"): Learning rate scheduling strategy.warmup(bool, defaultFalse): Enable LR warmup.log_to_tb(bool, defaultTrue): Write TensorBoard logs (./tb_logs/supernet/{tag}).
Returns
None: Createslogs/{tag}-seed-{seed}.txtandcheckpoint/{tag}-seed-{seed}.ptunder the specifiedsave_path.
Examples
ysautoml.network.fewshot.mobilenet.search_supernet
ysautoml.network.fewshot.mobilenet.search_supernet(**kwargs)
Run evolutionary architecture search on a pre-trained MobileNet SuperNet checkpoint.
Parameters
ckpt(str): Checkpoint name to load (e.g.,"baseline0-seed-0").seed(int, default123): Random seed.gpu(int, default0): GPU index.data_path(str, default"/dataset/ILSVRC2012"): Dataset root path.save_path(str, default"./Search"): Directory for search results. Automatically resolved relative to the caller’s working directory.search_space(str, default"proxyless"): Search space type.workers(int, default4): Number of dataloader workers.run_calib(bool, defaultFalse): Enable BatchNorm calibration before evaluation.
Returns
None: Evolutionary search results are logged and stored undersave_path:logs/ER-{ckpt}-runseed-{seed}.txtcheckpoint/ER-{ckpt}-runseed-{seed}.pt
Examples
Last updated