4a5eef64d2a0ab5e1737ffbb345d9e72d2f1adc9,train.py,,,#,56

Before Change



parser = argparse.ArgumentParser()
// Basic options
parser.add_argument("--gpu", type=int, default=-1)
parser.add_argument("--content_dir", type=str, required=True,
                    help="Directory path to a batch of content images")
parser.add_argument("--style_dir", type=str, required=True,
                    help="Directory path to a batch of style images")

After Change


    if (i + 1) % args.save_model_interval == 0 or (i + 1) == args.max_iter:
        state_dict = net.decoder.state_dict()
        for key in state_dict.keys():
            state_dict[key] = state_dict[key].to(torch.device("cpu"))
        torch.save(state_dict,
                   "{:s}/decoder_iter_{:d}.pth.tar".format(args.save_dir,
                                                           i + 1))
writer.close()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: naoto0804/pytorch-AdaIN
Commit Name: 4a5eef64d2a0ab5e1737ffbb345d9e72d2f1adc9
Time: 2018-05-16
Author: inoue@hal.t.u-tokyo.ac.jp
File Name: train.py
Class Name:
Method Name:


Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: ac7bb33dd978e2bf6ecb0cf055dd6bf6c9c1ea05
Time: 2019-04-19
Author: eriklindernoren@live.se
File Name: train.py
Class Name:
Method Name:


Project Name: naoto0804/pytorch-AdaIN
Commit Name: 4a5eef64d2a0ab5e1737ffbb345d9e72d2f1adc9
Time: 2018-05-16
Author: inoue@hal.t.u-tokyo.ac.jp
File Name: test.py
Class Name:
Method Name: