Skip to content

Commit 5989e55

Browse files
author
David Pollack
committed
Fix CrossEntropyLoss in transformers tutorial
Signed-off-by: David Pollack <[email protected]>
1 parent 0d0f954 commit 5989e55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

beginner_source/transformer_tutorial.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def forward(self, src):
8686
src = self.pos_encoder(src)
8787
output = self.transformer_encoder(src, self.src_mask)
8888
output = self.decoder(output)
89-
return F.log_softmax(output, dim=-1)
89+
return output
9090

9191

9292
######################################################################

0 commit comments

Comments
 (0)