Skip to content
Snippets Groups Projects
Commit 66dc9e2e authored by Yandi's avatar Yandi
Browse files

adding relu at the end of lstm to avoid NaN

parent 7afdaaa3
No related branches found
No related tags found
1 merge request!1Master into main
No preview for this file type
......@@ -112,6 +112,8 @@ class BidirectionalLSTM(nn.Module):
out, (hidden_state, cell_state) = self.lstm(x, (h0, c0))
result = self.fc(out)
result = nn.ReLU()(result)
return result
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment