-
Notifications
You must be signed in to change notification settings - Fork 45
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
why do we manually loop through each batch ? #22
Comments
Hi @linminhtoo , I have same question as you. The scripts make batchsize=64 while actually batchsize is hardcoded as 1. I noticed the line (https://github.com/FreyrS/dMaSIF/blob/master/data_iteration.py#L353) also ensures the batchsize=1 when optimize the model. |
Hi @linminhtoo, You're absolutely right, we generate the surfaces of a batch but then iterate individually through them. |
@FreyrS @linminhtoo @Wendysigh @jeanfeydy the first example in the masif-site test |
Hello authors,
I am in the process of modifying dMaSIF for the downstream task of protein-ligand binding affinity prediction. While reading & modifying your code, I noticed that in
data_iteration.iterate
, https://github.com/FreyrS/dMaSIF/blob/master/data_iteration.py#L290we actually extract individual proteins/protein-pairs in a batch, and then do forward pass on each of those batches.
Effectively, doesn't this equate to a batch_size of 1 ? even though in the
benchmark_scripts
, the--batch_size
argument is set to 64, it is not actually used and thebatch_size
is hardcoded to 1. https://github.com/FreyrS/dMaSIF/blob/master/main_training.py#L51Is there a reason for doing this, rather than just doing a forward pass on the entire batch?
As a side note, this line (https://github.com/FreyrS/dMaSIF/blob/master/data_iteration.py#L299) also indicates that the code is hardcoded to a batch_size of 1. My understanding was that it should be
P1["rand_rot"] = protein_pair.rand_rot1.view(-1, 3, 3)[protein_it]
instead ofP1["rand_rot"] = protein_pair.rand_rot1.view(-1, 3, 3)[0]
Thank you and appreciate your help.
The text was updated successfully, but these errors were encountered: