efd31f17f6753ee92ef1038016bd9470f25867d1,train.py,,,#,74

Before Change


    if not os.path.exists("./saves"):
        os.makedirs("./saves")
    // Device
    args.device = torch.device(args.device
        if torch.cuda.is_available() else "cpu")
    // Slurm
    if "SLURM_JOB_ID" in os.environ:
        args.output_folder += "-{0}".format(os.environ["SLURM_JOB_ID"])

After Change


    misc.add_argument("--num-workers", type=int, default=mp.cpu_count() - 1,
        help="number of workers for trajectories sampling (default: "
             "{0})".format(mp.cpu_count() - 1))
    misc.add_argument("--use-cuda", action="store_true",
        help="use cuda (default: false, use cpu)")

    args = parser.parse_args()
    args.device = "cuda" if args.use_cuda else "cpu"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: tristandeleu/pytorch-maml-rl
Commit Name: efd31f17f6753ee92ef1038016bd9470f25867d1
Time: 2019-12-08
Author: tristan.deleu@gmail.com
File Name: train.py
Class Name:
Method Name:


Project Name: jindongwang/transferlearning
Commit Name: 2733bef356c53286d475a67476d88d4840923830
Time: 2020-09-30
Author: jindongwang@outlook.com
File Name: code/deep/finetune_AlexNet_ResNet/finetune_office31.py
Class Name:
Method Name:


Project Name: dmlc/dgl
Commit Name: 189c2c0907cdff54f733299a93360ddfcff4ccb7
Time: 2019-09-07
Author: mufeili1996@gmail.com
File Name: examples/pytorch/model_zoo/chem/property_prediction/regression.py
Class Name:
Method Name:


Project Name: tristandeleu/pytorch-maml-rl
Commit Name: efd31f17f6753ee92ef1038016bd9470f25867d1
Time: 2019-12-08
Author: tristan.deleu@gmail.com
File Name: train.py
Class Name:
Method Name: