-
Notifications
You must be signed in to change notification settings - Fork 9
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
A problem in the PositionalEncoding model code #42
Comments
Hi @kir1to455 Thank you for raising this issue! The move I think you are correct about the PE which is a separate issue. One simple fix could be change the dimension of the pe loaded and let pytorch handle the broad casting. You can try this: x = x + self.pe[:x.size(1)].transpose(0, 1) I think the decoder compensated for the pe issue, and I'll definitely fix this in the next version! Let me know if you have other questions. Jimin |
Hi, Jimin @tanjimin Best wishes, |
Hi @kir1to455 , the decoder here is actually a dilated 2D conv resnet. It is very different from the typical transformer unless you consider ViT. I named it decoder because it follows the encoder-decoder architecture and decodes genomic features to the final Hi-C map. |
Hi,
Thank you for developing Corigami !
I have encountered some problems when I use corigami to train my data.
After the encoder step,here, the transposed matrix is input into attn.
the matrix x is : Tensor, shape [batch_size, seq_lenth, embedding_dim], not Tensor, shape [seq_lenth, batch_size, embedding_dim] !
if perform this step: x = x + self.pe[:x.size(0)] will return the wrong location information result.
I think the code may have made an error in transponse after the encoder.
Best wishes,
Kirtio
The text was updated successfully, but these errors were encountered: