Skip to content
Snippets Groups Projects
Commit 9fa94f3b authored by Franck Dary's avatar Franck Dary
Browse files

Increased number of parameters in Neural network and applied more dropout

parent bf44c7fe
No related branches found
No related tags found
No related merge requests found
......@@ -9,13 +9,13 @@ class BaseNet(nn.Module):
self.inputSize = inputSize
self.outputSize = outputSize
self.embeddings = {name : nn.Embedding(len(dicts.dicts[name]), self.embSize) for name in dicts.dicts.keys()}
self.fc1 = nn.Linear(inputSize * self.embSize, 128)
self.fc2 = nn.Linear(128, outputSize)
self.fc1 = nn.Linear(inputSize * self.embSize, 1600)
self.fc2 = nn.Linear(1600, outputSize)
self.dropout = nn.Dropout(0.3)
def forward(self, x) :
x = self.dropout(self.embeddings["UPOS"](x).view(x.size(0), -1))
x = F.relu(self.fc1(x))
x = F.relu(self.dropout(self.fc1(x)))
x = self.fc2(x)
return x
################################################################################
......
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