Skip to content

Commit

Permalink
Fix embedding error for models with no notes
Browse files Browse the repository at this point in the history
  • Loading branch information
sophmrtn committed Jul 3, 2024
1 parent b732b5f commit 83267b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def forward(self, input_):


class Gate(nn.Module):
# Adapted from https://github.com/emnlp-mimic/mimic/blob/main/base.py#L136 inspired by https://ieeexplore.ieee.org/document/9746536
# Adapted from https://github.com/emnlp-mimic/mimic/blob/main/base.py#L136 inspired by https://arxiv.org/pdf/1908.05787
def __init__(self, inp1_size, inp2_size, inp3_size: int = 0, dropout: int = 0):
super().__init__()

Expand Down Expand Up @@ -105,7 +105,7 @@ def __init__(
self.embed_notes = nn.Linear(nt_input_dim, nt_embed_dim)
else:
self.embed_notes = None
self.nt_embed_dim = 0
nt_embed_dim = 0

if self.fusion_method == "mag":
if self.st_first:
Expand Down

0 comments on commit 83267b9

Please sign in to comment.