844fa63c841e6bed6d05606445640486a6ca4dd0,custom_containers/pytorch/mnist/trainer/mnist.py,,main,#,93

Before Change



def main():
  // Training settings
  parser = argparse.ArgumentParser(description="PyTorch MNIST Example")
  parser.add_argument(
      "--batch-size",
      type=int,
      default=64,
      metavar="N",
      help="input batch size for training (default: 64)")
  parser.add_argument(
      "--test-batch-size",
      type=int,
      default=1000,
      metavar="N",
      help="input batch size for testing (default: 1000)")
  parser.add_argument(
      "--epochs",
      type=int,
      default=10,
      metavar="N",
      help="number of epochs to train (default: 10)")
  parser.add_argument(
      "--lr",
      type=float,
      default=0.01,
      metavar="LR",
      help="learning rate (default: 0.01)")
  parser.add_argument(
      "--momentum",
      type=float,
      default=0.5,
      metavar="M",
      help="SGD momentum (default: 0.5)")
  parser.add_argument(
      "--no-cuda",
      action="store_true",
      default=False,
      help="disables CUDA training")
  parser.add_argument(
      "--seed",
      type=int,
      default=1,
      metavar="S",
      help="random seed (default: 1)")
  parser.add_argument(
      "--log-interval",
      type=int,
      default=10,
      metavar="N",
      help="how many batches to wait before logging training status")
  parser.add_argument(
      "--model-dir",
      default=None,
      help="The directory to store the model")

  args = parser.parse_args()
  use_cuda = not args.no_cuda and torch.cuda.is_available()

  torch.manual_seed(args.seed)

After Change



def main():
  // Training settings
  args = get_args()
  use_cuda = not args.no_cuda and torch.cuda.is_available()

  torch.manual_seed(args.seed)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 11

Instances


Project Name: GoogleCloudPlatform/cloudml-samples
Commit Name: 844fa63c841e6bed6d05606445640486a6ca4dd0
Time: 2019-01-24
Author: wenzhel@google.com
File Name: custom_containers/pytorch/mnist/trainer/mnist.py
Class Name:
Method Name: main


Project Name: GoogleCloudPlatform/cloudml-samples
Commit Name: 844fa63c841e6bed6d05606445640486a6ca4dd0
Time: 2019-01-24
Author: wenzhel@google.com
File Name: custom_containers/pytorch/mnist/trainer/mnist.py
Class Name:
Method Name: main


Project Name: GoogleCloudPlatform/cloudml-samples
Commit Name: e7d063b1ad9153d107b8146a9147f0b3ba386fb9
Time: 2019-01-29
Author: nnegrey@google.com
File Name: pytorch/containers/published_container/sonar_training/trainer/task.py
Class Name:
Method Name: main


Project Name: GoogleCloudPlatform/cloudml-samples
Commit Name: f53f4f0a1196e61e24ffee2b4ab2eededdc46ac6
Time: 2018-11-07
Author: gogasca@google.com
File Name: iris/tensorflow/estimator/trainer/task.py
Class Name:
Method Name: