lightingghost / chemopt

Optimizing Chemical Reactions with Deep Reinforcement Learning
MIT License
113 stars 42 forks source link

Need clarifications regarding a couple of points in code #1

Open vishnuTV183 opened 5 years ago

vishnuTV183 commented 5 years ago
  1. In 'lets_start.py' you are evaluating a model after every 'evaluation_period' number of epochs. But you are also running the operation 'step' during evaluation (line 44 in lets_start.py) which will also update the model weights rather than just using the learned weights to evaluate. Why is this done?. Please clarify if I am missing something.

  2. In the file 'model.py' at line 15, you are creating the discount factor array (self.df) and using it only for loss type 'naive' in the 'loss_func' (line 89) and not for loss type 'oi'. This is different from the paper as you mention in equation 9 in your paper that you are using it. Is there any reason for not using it in the code for 'oi' loss type?. Please clarify.

lightingghost commented 5 years ago

Thanks for your questions.

  1. This is just training time evaluation. For test time, see eval.py. Actually, note that our eval samples and test samples are generated randomly from a distribution, which means the probability of seeing a previously tested sample is 0. Therefore is does not matter whether we apply gradient descent on the weight.

  2. The actual loss function we are applying is in equation (4) of our paper. The experimental details actually shows a previous version of our loss function. We apologize for the mistake.

GbengaOdesanmi commented 5 years ago

@all, Please I am trying to run the code but am having this error about "save_path": "./ckpt/8_dim_quad/h128_s50_srnn/", that the file is missing. Kindly help me on way forward, thanks in advance

raceback (most recent call last): File "lets_start.py", line 59, in main() File "lets_start.py", line 27, in main model = util.create_model(sess, config, logger) File "/home/gbenga/Documents/Optimization/chemopt-master/util.py", line 21, in create_model os.mkdir(config.save_path) FileNotFoundError: [Errno 2] No such file or directory: './ckpt/8_dim_quad/h128_s50_srnn/'

lightingghost commented 5 years ago

@GbengaOdesanmi Please create the directory ckpt\xxxx manually at the project root, and change the saving_path in config.json to xxxx