Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro pann committed Feb 1, 2020
1 parent 970a794 commit 08e9d81
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion babyai/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ def forward(self, obs, memory, instr_embedding=None):
# It can be too big though, because instr_embeddings might be shorter than obs.instr
# when the last position in a batch is all zeros.
mask = mask[:, :instr_embedding.shape[1]]
instr_embedding = instr_embedding[:, :mask.shape[1]]
keys = self.memory2key(memory)
pre_softmax = (keys[:, None, :] * instr_embedding).sum(2) + 1000 * mask
attention = F.softmax(pre_softmax, dim=1)
Expand Down

0 comments on commit 08e9d81

Please sign in to comment.