Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing parameters while testing the model #63

Open
mailanmi opened this issue Mar 9, 2023 · 6 comments
Open

Changing parameters while testing the model #63

mailanmi opened this issue Mar 9, 2023 · 6 comments

Comments

@mailanmi
Copy link

mailanmi commented Mar 9, 2023

First of all thanks for a great code :)

I'm trying to test the model on my protein-ligand complexes. During testing I tried to change some parameters in the config/generate.config file. However, I noticed that some of the parameters are numerically correlated with each other.
For example changing "n_levels" from 4 to 6 results in
image

Could you tell me how the parameters are correlated with each other or where can I check it?

And is there any file where I could check what does each name in the config file mean?

Thanks

@mattragoza
Copy link
Owner

Sure, n_levels controls how many groups of convolution blocks there are with pooling layers in between. The number of 2x2x2 pooling layers will be n_levels - 1. Therefore, if the grid shape is not divisible by 2^{n_levels - 1}, the dimensions of the model will not work out as it will try to pool across spatial dimensions that have already been consumed.

If you are just trying to increase the model capacity without worrying about the grid shape/pooling layers, you could instead increase the conv_per_block (i.e. depth) or the n_filters (i.e. width).

@mattragoza
Copy link
Owner

Also, note that the gen_model config options need to be the same as the ones in the train.config file that were used to train the model. If you change the gen_model options but don't retrain the model, generate.py will either fail to load the weights or produce unexpected output (for instance if you use different activation function than was used to train the model).

If you want to try a different model architecture you need to train a new model.

@mailanmi
Copy link
Author

Thanks for reply! I get it now.
And what about atom_fitting config options? Is it okay to change them without retraining the model?

@mattragoza
Copy link
Owner

Yes, but the current settings are pretty optimized. Changing the atom fittings settings arbitrarily will likely decrease the quality of the molecules unless you plan to do a large-scale hyperparameter search. What are you trying to achieve?

@mailanmi
Copy link
Author

So I want to test your model on a certain protein, which I am currently studying. I already ran the model on default settings (changing variability and prior/post) and I was wondering how the results change depending on other config parameters. However, if you advise me not to change other settings, I think I will leave it alone.

I also have one more question. I plan to retrain the model using only protein-ligand complexes of this one certain protein (around 70 complexes) instead of the crossdock2020 set. As my set is way smaller, I suppose I don't need so many iterations as there are currently in the train.config file (max_n_iters)? Could you advise me how can I alter train.config file most optimally in this case? Which parameters should I change?

@mailanmi
Copy link
Author

Sorry to bother you so much, but could you provide me with your .train_metrics file, which you got from your training? I would like to compare a loss function I received from my training to yours.
According to your notebook https://github.com/mattragoza/ipython-notebooks/blob/master/koes_group/train_molport_loss_weights.ipynb
you have such terms like gen_L2_loss or gen_adv_loss, which I don't have in my file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants