Skip to content

Commit

Permalink
fix(LeNet5): 批量大小为1时LeNet5前向操作中C5->F6步骤出错
Browse files Browse the repository at this point in the history
  • Loading branch information
zjZSTU committed May 28, 2019
1 parent 844d749 commit 48b5a46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nn/nets.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def forward(self, inputs):
x = self.maxPool2(x)
x = self.relu3(self.conv3(x))
# (N, C, 1, 1) -> (N, C)
x = x.squeeze()
x = x.reshape(x.shape[0], -1)
x = self.relu4(self.fc1(x))
x = self.fc2(x)

Expand Down

0 comments on commit 48b5a46

Please # to comment.