Skip to content

Commit 3765bb4

Browse files
committed
NNLM-Torch.py nn.functional to torch
1 parent 06ca9dd commit 3765bb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

1-1.NNLM/NNLM-Torch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(self):
4646

4747
def forward(self, X):
4848
input = X.view(-1, n_step * n_class) # [batch_size, n_step * n_class]
49-
tanh = nn.functional.tanh(self.d + torch.mm(input, self.H)) # [batch_size, n_hidden]
49+
tanh = torch.tanh(self.d + torch.mm(input, self.H)) # [batch_size, n_hidden]
5050
output = self.b + torch.mm(input, self.W) + torch.mm(tanh, self.U) # [batch_size, n_class]
5151
return output
5252

0 commit comments

Comments
 (0)