main.py 1.2 KB

123456789101112131415161718192021222324252627
  1. import argparse
  2. parser = argparse.ArgumentParser()
  3. parser.add_argument('--task_id', type=int, default=4, help='bAbI task id')
  4. parser.add_argument('--question_id', type=int, default=0, help='question types')
  5. parser.add_argument('--workers', type=int, help='number of data loading workers', default=2)
  6. parser.add_argument('--batchSize', type=int, default=10, help='input batch size')
  7. parser.add_argument('--state_dim', type=int, default=4, help='GGNN hidden state size')
  8. parser.add_argument('--n_steps', type=int, default=5, help='propogation steps number of GGNN')
  9. parser.add_argument('--niter', type=int, default=10, help='number of epochs to train for')
  10. parser.add_argument('--lr', type=float, default=0.01, help='learning rate')
  11. parser.add_argument('--cuda', action='store_true', help='enables cuda')
  12. parser.add_argument('--verbal', action='store_true', help='print training info or not')
  13. parser.add_argument('--manualSeed', type=int, help='manual seed')
  14. opt = parser.parse_args()
  15. print(opt)
  16. def print_hi(name):
  17. # Use a breakpoint in the code line below to debug your script.
  18. print(f'Hi, {name}') # Press ⌘F8 to toggle the breakpoint.
  19. if __name__ == '__main__':
  20. print_hi('PyCharm')