yanfeiguan / reactivity_predictions_substitution Goto Github PK
View Code? Open in Web Editor NEWPlatforms to predict reactivity for substitution reactions.
Platforms to predict reactivity for substitution reactions.
Hello,
I execute the command “ python reactivity.py -m ml_QM_GNN --data_path uspto_demo_data/uspto_CH.csv --model_dir my direction”, after which, only "best_model.hdf" are saved in the folder but without "scalerss.pickle". Could you give me some help?
THX!!!
When I try to training the model with the sample data, an error occurred:
ValueError: in user code:
/home/lhlai_pkuhpc/lustre1/wangsw/software/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py:806 train_function *
return step_function(self, iterator)
/lustre1/lhlai_pkuhpc/ljr/MLQM/ml_QM_GNN/WLN/models.py:64 call *
res_atom_hidden = self.reactants_WLN(res_inputs)
/lustre1/lhlai_pkuhpc/ljr/MLQM/ml_QM_GNN/WLN/layers.py:52 call *
h_nei_atom = self.nei_atom(fatom_nei) #(batch, #atoms, max_nb, hidden)
/home/lhlai_pkuhpc/lustre1/wangsw/software/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py:976 __call__ **
self.name)
/home/lhlai_pkuhpc/lustre1/wangsw/software/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/input_spec.py:168 assert_input_compatibility
layer_name + ' is incompatible with the layer: '
ValueError: Input 0 of layer dense_1 is incompatible with the layer: its rank is undefined, but the layer requires a defined rank.
Therefore, I tried to fix this error by reshaping fatom_nei and fbond_nei in layers.py:
fatom_nei = tf.reshape(fatom_nei, (4, 10, 10, -1))
fbond_nei = tf.reshape(fbond_nei, (4, 10, 10, -1))
In this way, the former error was fixed, but another error appeared:
tensorflow.python.framework.errors_impl.InvalidArgumentError: Incompatible shapes: [4] vs. [22]
[[node gradient_tape/wln_loss/mul/Mul (defined at reactivity.py:178) ]] [Op:__inference_train_function_4257]
Errors may have originated from an input operation.
Input Source operations connected to node gradient_tape/wln_loss/mul/Mul:
wln_loss/Cast (defined at reactivity.py:105)
Function call stack:
train_function
2020-09-18 16:58:26.206245: W tensorflow/core/kernels/data/generator_dataset_op.cc:103] Error occurred when finalizing GeneratorDataset iterator: Failed precondition: Python interpreter state is not initialized. The process may be terminated.
[[{{node PyFunc}}]]
I cannot figure out why these errors happened, so here I'm seeking for your reply and advice.
P.S. The predicting function operates well.
In uspto_demo_data, I found that the uspto_CX.csv and uspto_others.csv are actually the same dataset.
Would you please provide another dataset if convenient?
In the paper "Regio-Selectivity Prediction with a Machine-Learned Reaction Representation and On-the-Fly Quantum Mechanical Descriptors", you metioned that ml-QM-GNN model is able to predict reaction yield on Doyle's dataset, while I couldn't find this dataset in this GitHub project. Would you please provide this dataset and the code to preprocess the dataset and train model on this dataset?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.