Skip to content

Commit

Permalink
fix with k in gan
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragav Venkatesan committed Mar 11, 2017
1 parent 7245bb5 commit 151fa79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yann/special/gan.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ def train ( self, verbose, **kwargs):
if self.softmax_head is True:
softmax_cost = self.mini_batch_train_softmax (minibatch, epoch_counter)
disc_cost = self.mini_batch_train_discriminator (minibatch, epoch_counter)
if minibatch % k == 0:
if (minibatch + 1) * (batch + 1 ) * (epoch_counter + 1) % k == 0:
gen_cost = self.mini_batch_train_generator (minibatch, epoch_counter)

if numpy.isnan(gen_cost) or \
Expand Down

0 comments on commit 151fa79

Please sign in to comment.