Skip to content

Commit 5fd5509

Browse files
switch / to //
1 parent 17b14ca commit 5fd5509

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

beginner_source/nlp/advanced_tutorial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ def __init__(self, vocab_size, tag_to_ix, embedding_dim, hidden_dim):
180180
self.hidden = self.init_hidden()
181181

182182
def init_hidden(self):
183-
return (autograd.Variable(torch.randn(2, 1, self.hidden_dim / 2)),
184-
autograd.Variable(torch.randn(2, 1, self.hidden_dim / 2)))
183+
return (autograd.Variable(torch.randn(2, 1, self.hidden_dim // 2)),
184+
autograd.Variable(torch.randn(2, 1, self.hidden_dim // 2)))
185185

186186
def _forward_alg(self, feats):
187187
# Do the forward algorithm to compute the partition function

0 commit comments

Comments
 (0)