Exemplo n.º 1
0
import yaml
from scheduling import launch


def create_jobs():
    jobs = [
        """python main.py --dataset imagenet --model resnet18 --opt alig
            --eta 10.0 --momentum 0.0 --batch_size 1024 --epochs 90
            --max_norm 400 --no_data_augmentation"""
    ]
    return jobs


if __name__ == "__main__":
    jobs = create_jobs()
    launch(jobs)
Exemplo n.º 2
0
import os

from scheduling import launch

jobs = [
    # SGD-CE
    "python train_nli.py --opt sgd --eta 1 --loss ce --no-tqdm",

    # SGD-SVM
    "python train_nli.py --opt sgd --eta 0.1 --loss svm --no-tqdm",

    # ADAM-SVM
    "python train_nli.py --opt adam --eta 1e-4 --loss svm --no-tqdm",

    # ADAM-CE
    "python train_nli.py --opt adam --eta 1e-4 --loss ce --no-tqdm",

    # # DFW-SVM
    "python train_nli.py --opt dfw --eta 1 --loss svm --no-tqdm",
]

if __name__ == "__main__":
    # change current directory to InferSent
    os.chdir('./InferSent/')
    launch(jobs, interval=3)
    # change current directory back to original
    os.chdir('..')
Exemplo n.º 3
0
        for lr in lr_list:
            jobs.append('python train.py --optimizer {optimizer} --learning_rate {lr}'
                        .format(optimizer=optimizer, lr=lr))
    jobs.append("python train.py --optimizer alig")


def add_l4_jobs(jobs):
    optimizers = ('l4adam', 'l4mom')
    fraction_list = list(np.round(np.arange(0.05, 1, 0.05), 2))
    for optimizer in optimizers:
        for fraction in fraction_list:
            jobs.append('python train.py --optimizer {optimizer} --fraction {fraction}'
                        .format(optimizer=optimizer, fraction=fraction))


def create_jobs():
    jobs = []
    add_gradient_jobs(jobs)
    add_l4_jobs(jobs)
    return jobs


if __name__ == "__main__":
    jobs = create_jobs()

    # change current directory to InferSent
    os.chdir('./dnc/')
    launch(jobs, on_gpu=False)
    # change current directory back to original
    os.chdir('..')