adapt grid
This commit is contained in:
@@ -4,13 +4,16 @@ constants:
|
|||||||
logging.write_tag: linear_probe
|
logging.write_tag: linear_probe
|
||||||
|
|
||||||
grid:
|
grid:
|
||||||
optimization.lr: [0.01, 0.05]
|
optimization.optimizer: [adamw]
|
||||||
|
optimization.lr: [0.01, 0.05, 0.001]
|
||||||
optimization.weight_decay: [0.0, 5.0e-4]
|
optimization.weight_decay: [0.0, 5.0e-4]
|
||||||
data.batch_size: [128, 256]
|
optimization.momentum: [0.9, 0.5]
|
||||||
|
optimization.lr_schedule: [step, cosine]
|
||||||
|
data.batch_size: [256, 128]
|
||||||
|
|
||||||
launch:
|
launch:
|
||||||
folder: submitit_logs/
|
folder: submitit_logs/
|
||||||
partition: gpu1
|
partition: gpu1
|
||||||
nodes: 1
|
nodes: 1
|
||||||
tasks_per_node: 1
|
tasks_per_node: 1
|
||||||
time: 300
|
time: 500
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ optimization:
|
|||||||
epochs: 300
|
epochs: 300
|
||||||
lr: 0.01
|
lr: 0.01
|
||||||
weight_decay: 5.0e-4
|
weight_decay: 5.0e-4
|
||||||
use_cosine_schedule: false
|
|
||||||
lr_schedule: step
|
lr_schedule: step
|
||||||
step_milestones: [15, 30, 45]
|
step_milestones: [15, 30, 45]
|
||||||
step_gamma: 0.1
|
step_gamma: 0.1
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ def main(args, resume_preempt=False):
|
|||||||
milestones=o_args.get("step_milestones", [15, 30, 45]),
|
milestones=o_args.get("step_milestones", [15, 30, 45]),
|
||||||
gamma=o_args.get("step_gamma", 0.1),
|
gamma=o_args.get("step_gamma", 0.1),
|
||||||
)
|
)
|
||||||
elif o_args["use_cosine_schedule"]:
|
elif lr_schedule == "cosine":
|
||||||
scheduler = torch.optim.lr_scheduler.CosineAnnealingLR(
|
scheduler = torch.optim.lr_scheduler.CosineAnnealingLR(
|
||||||
optimizer, T_max=o_args["epochs"], eta_min=o_args["final_lr"]
|
optimizer, T_max=o_args["epochs"], eta_min=o_args["final_lr"]
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ def build_run_name(args):
|
|||||||
add("wd", weight_decay)
|
add("wd", weight_decay)
|
||||||
add("ep", epochs)
|
add("ep", epochs)
|
||||||
add("sched", opt_args.get("lr_schedule"))
|
add("sched", opt_args.get("lr_schedule"))
|
||||||
add("cos", opt_args.get("use_cosine_schedule"))
|
|
||||||
add("ms", opt_args.get("step_milestones"))
|
add("ms", opt_args.get("step_milestones"))
|
||||||
add("sg", opt_args.get("step_gamma"))
|
add("sg", opt_args.get("step_gamma"))
|
||||||
add("wu", opt_args.get("warmup"))
|
add("wu", opt_args.get("warmup"))
|
||||||
|
|||||||
Reference in New Issue
Block a user