Skip to content

Commit

Permalink
Merge pull request #27 from brennanaba/patch-1
Browse files Browse the repository at this point in the history
Code breaks if there is no mask defined
  • Loading branch information
hypnopump committed Apr 5, 2021
2 parents 876f995 + 881db08 commit 6d423c9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions egnn_pytorch/egnn_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,9 @@ def forward(self, feats, coors, edges = None, mask = None, adj_mat = None):
coors_out = coors

if exists(self.node_mlp):
m_ij_mask = rearrange(mask, '... -> ... ()')
m_ij = m_ij.masked_fill(~m_ij_mask, 0.)
if exists(mask):
m_ij_mask = rearrange(mask, '... -> ... ()')
m_ij = m_ij.masked_fill(~m_ij_mask, 0.)

if self.m_pool_method == 'mean':
if exists(mask):
Expand Down

0 comments on commit 6d423c9

Please sign in to comment.