Fix E714 flake8 warning (x8).

This commit is contained in:
Aymeric Augustin committed 2019-12-22 10:59:07 +01:00
1 parent 5eab3cf6bc
commit fd2f17a7a1
8 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -519,7 +519,7 @@ class MultiHeadedAttention(nn.Module):
attn = self.softmax(scores)
if not predefined_graph_1 is None:
if predefined_graph_1 is not None:
attn_masked = attn[:, -1] * predefined_graph_1
attn_masked = attn_masked / (torch.sum(attn_masked, 2).unsqueeze(2) + 1e-9)