Skip to content

Commit

Permalink
fix inference bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Muyiyuan committed Jul 30, 2023
1 parent e62d167 commit 0372091
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BEdeepoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, input_dim, emb_dim, hid_dim, n_layers, dropout):
super(Net, self).__init__()

self.embedding_1 = nn.Embedding(input_dim, emb_dim)
self.embedding_2 = nn.Embedding(input_dim, emb_dim, _weight=self.embedding_1.weight)
self.embedding_2 = nn.Embedding(input_dim, emb_dim)
self.rnn = nn.LSTM(input_size=emb_dim, hidden_size=hid_dim, num_layers=n_layers,
bidirectional=True)
self.dropout = nn.Dropout(dropout)
Expand Down Expand Up @@ -239,4 +239,4 @@ def prep_inputs(df_inputs):
df_eff = do_pred(batches, model, device).reset_index(drop=True)

df_eff.to_csv(args.output_file, sep='\t', index=False, float_format='%.6g')


0 comments on commit 0372091

Please sign in to comment.