We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2957663 commit 078911aCopy full SHA for 078911a
06-Natural Language Process/bag-of-word.py
@@ -50,7 +50,7 @@ def forward(self, x):
50
if torch.cuda.is_available():
51
model = model.cuda()
52
53
-criterion = nn.CrossEntropyLoss()
+criterion = nn.NLLLoss()
54
optimizer = optim.SGD(model.parameters(), lr=1e-3)
55
56
for epoch in range(100):
0 commit comments