ydin0771 commited on
Commit
b3c8e4c
β€’
1 Parent(s): 2bfe225

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +7 -29
config.py CHANGED
@@ -95,6 +95,7 @@ config = Config()
95
  def parseArgs():
96
  parser = argparse.ArgumentParser(fromfile_prefix_chars = "@")
97
 
 
98
  ################ systems
99
 
100
  #custom args
@@ -222,7 +223,7 @@ def parseArgs():
222
  parser.add_argument("--memoryVariationalDropout", action = "store_true", help = "use variational dropout across the MAC network")
223
 
224
  ## nonlinearities
225
- parser.add_argument("--relu", default = "STD", choices = ["STD", "PRM", "ELU", "LKY", "SELU"], type = str, help = "type of ReLU to use: standard, parametric, ELU, or leaky")
226
  # parser.add_argument("--reluAlpha", default = 0.2, type = float, help = "alpha value for the leaky ReLU")
227
 
228
  parser.add_argument("--mulBias", default = 0.0, type = float, help = "bias to add in multiplications (x + b) * (y + b) for better training") #
@@ -324,7 +325,7 @@ def parseArgs():
324
  parser.add_argument("--controlFeedPrev", action = "store_true", help = "feed previous control state")
325
  parser.add_argument("--controlFeedPrevAtt", action = "store_true", help = "feed previous control post word attention (otherwise will feed continuous control)")
326
  parser.add_argument("--controlFeedInputs", action = "store_true", help = "feed question representation")
327
- parser.add_argument("--controlContAct", default = "NON", type = str, choices = ["NON", "RELU", "TANH"], help = "activation on the words interactions")
328
 
329
  # step 2: word attention and optional projection
330
  parser.add_argument("--controlConcatWords", action = "store_true", help = "concatenate words to interaction when computing attention")
@@ -426,33 +427,10 @@ def parseArgs():
426
  # parser.add_argument("--gumbelSoftmaxBoth", action = "store_true", help = "use softmax for training and testing") #
427
  # parser.add_argument("--gumbelArgmaxBoth", action = "store_true", help = "use argmax for training and testing") #
428
 
429
- parser.set_defaults(
430
- parallel=True,
431
- evalTrain=True,
432
- retainVal=True,
433
- useEMA=True,
434
- lrReduce=True,
435
- adam=True,
436
- clip=True,
437
- memoryVariationalDropout=True,
438
- relu='ELU',
439
- encBi=True,
440
- wrdEmbRandom=True,
441
- wrdEmbUniform=True,
442
- outQuestion=True,
443
- initCtrl='Q',
444
- controlContextual=True,
445
- controlInputUnshared=True,
446
- readProjInputs=True,
447
- readMemConcatKB=True,
448
- readMemConcatProj=True,
449
- readMemProj=True,
450
- readCtrl=True,
451
- writeMemProj=True,
452
- restore=True,
453
- expName='PDF_exp_extra',
454
- netLength=16
455
- )
456
 
457
  ###################################### dataset configuration ######################################
458
 
 
95
  def parseArgs():
96
  parser = argparse.ArgumentParser(fromfile_prefix_chars = "@")
97
 
98
+
99
  ################ systems
100
 
101
  #custom args
 
223
  parser.add_argument("--memoryVariationalDropout", action = "store_true", help = "use variational dropout across the MAC network")
224
 
225
  ## nonlinearities
226
+ parser.add_argument("--relu", default = "ELU", choices = ["STD", "PRM", "ELU", "LKY", "SELU"], type = str, help = "type of ReLU to use: standard, parametric, ELU, or leaky")
227
  # parser.add_argument("--reluAlpha", default = 0.2, type = float, help = "alpha value for the leaky ReLU")
228
 
229
  parser.add_argument("--mulBias", default = 0.0, type = float, help = "bias to add in multiplications (x + b) * (y + b) for better training") #
 
325
  parser.add_argument("--controlFeedPrev", action = "store_true", help = "feed previous control state")
326
  parser.add_argument("--controlFeedPrevAtt", action = "store_true", help = "feed previous control post word attention (otherwise will feed continuous control)")
327
  parser.add_argument("--controlFeedInputs", action = "store_true", help = "feed question representation")
328
+ parser.add_argument("--controlContAct", default = "TANH", type = str, choices = ["NON", "RELU", "TANH"], help = "activation on the words interactions")
329
 
330
  # step 2: word attention and optional projection
331
  parser.add_argument("--controlConcatWords", action = "store_true", help = "concatenate words to interaction when computing attention")
 
427
  # parser.add_argument("--gumbelSoftmaxBoth", action = "store_true", help = "use softmax for training and testing") #
428
  # parser.add_argument("--gumbelArgmaxBoth", action = "store_true", help = "use argmax for training and testing") #
429
 
430
+ parser.parse_args(namespace = config)
431
+
432
+
433
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
434
 
435
  ###################################### dataset configuration ######################################
436