GithubHelp home page GithubHelp logo

reactivity_predictions_substitution's People

Contributors

yanfeiguan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

reactivity_predictions_substitution's Issues

Errors encountered while training the model

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.

Demo data are the same

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?

Some questions about Doyle's dataset

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.