Skip to content

Commit f931931

Browse files
dmitriy-serdyuksoumith
authored andcommitted
Remove rectifier before softmax (pytorch#117)
1 parent e2f885d commit f931931

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mnist/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def forward(self, x):
6464
x = x.view(-1, 320)
6565
x = F.relu(self.fc1(x))
6666
x = F.dropout(x, training=self.training)
67-
x = F.relu(self.fc2(x))
67+
x = self.fc2(x)
6868
return F.log_softmax(x)
6969

7070
model = Net()

mnist_hogwild/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def forward(self, x):
4141
x = x.view(-1, 320)
4242
x = F.relu(self.fc1(x))
4343
x = F.dropout(x, training=self.training)
44-
x = F.relu(self.fc2(x))
44+
x = self.fc2(x)
4545
return F.log_softmax(x)
4646

4747
if __name__ == '__main__':

0 commit comments

Comments
 (0)