Commit 5414faa0 authored by Myosaki's avatar Myosaki Committed by Francisco Massa
Browse files

Correction wrong comments (#1211)

`self.fc1(x)` converts the shape of `x` into "N x 1024", and `self.fc2(x)` converts into "N x num_classes".

By adding `print(x.shape)` under each comment line, the console displays as follows (batch_size is 1):

```text
torch.Size([1, 2048])
torch.Size([1, 1024])
torch.Size([1, 1024])
torch.Size([1, 1024])
torch.Size([1, 1000])
```
parent 78c16095
...@@ -211,11 +211,11 @@ class InceptionAux(nn.Module): ...@@ -211,11 +211,11 @@ class InceptionAux(nn.Module):
x = torch.flatten(x, 1) x = torch.flatten(x, 1)
# N x 2048 # N x 2048
x = F.relu(self.fc1(x), inplace=True) x = F.relu(self.fc1(x), inplace=True)
# N x 2048 # N x 1024
x = F.dropout(x, 0.7, training=self.training) x = F.dropout(x, 0.7, training=self.training)
# N x 2048
x = self.fc2(x)
# N x 1024 # N x 1024
x = self.fc2(x)
# N x 1000 (num_classes)
return x return x
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment