zzw-zwzhang/TimeGAN-pytorch

Bugs in Discriminator (batch dimension and Linear layer output dim)

Opened this issue · 1 comments

It seems to me that the implementation of the Discriminator class has 2 issues:

  1. The RNN should have the input parameter batch_first set to True, but it is not set (and defaults to False):
    self.rnn = nn.GRU(input_size=opt.hidden_dim, hidden_size=opt.hidden_dim, num_layers=opt.num_layer)
  2. The output dimension of the Linear layer should be 1 as this is a binary classification block (predicting fake or not), but it is set to the hidden dimension:
    self.fc = nn.Linear(opt.hidden_dim, opt.hidden_dim)

    this does not produce an error, since later the loss function averages its input. But it means the calculation is not as it shold be.

How long is the training time? Why do you start iterating again after 50,000 iterations, and have been cycling this iterative process of 50,000 times?