Skip to content

Commit

Permalink
Add missing semi-colon in discriminator forward sigmoid array range. …
Browse files Browse the repository at this point in the history
…Fixes a warning about shape (UserWarning: Using a target size (torch.Size([64, 1])) that is different to the input size (torch.Size([64])) is deprecated. Please ensure they have the same size.)
  • Loading branch information
jmmcd committed May 23, 2018
1 parent 1427611 commit b254b26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions infoGAN.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def forward(self, input):
x = self.conv(input)
x = x.view(-1, 128 * (self.input_height // 4) * (self.input_width // 4))
x = self.fc(x)
a = F.sigmoid(x[:, self.output_dim])
a = F.sigmoid(x[:, :self.output_dim])
b = x[:, self.output_dim:self.output_dim + self.len_continuous_code]
c = x[:, self.output_dim + self.len_continuous_code:]

Expand Down Expand Up @@ -333,4 +333,4 @@ def loss_plot(self, hist, path='Train_hist.png', model_name=''):

path = os.path.join(path, model_name + '_loss.png')

plt.savefig(path)
plt.savefig(path)

0 comments on commit b254b26

Please sign in to comment.