Description
The following are some problems with the code I noticed while I was trying to reproduce results of the original paper.
-
Public dataset and preprocessing methods should be updated for reproducing results in original paper.
-
The noise sampling method is different from the original code.
During reproducing the results, using the same noise sampling mechanism fails to fit the original dataset B *torch.uniform((S, Z))
timegan-pytorch/models/utils.py
Line 114 in 7d04455
Should be changed to something like the code below, and not torch.random((B, S, Z))
to follow a more Wiener Process.
Z_mb = torch.zeros(B, S, Z)
for idx in batch_size:
Z_mb[idx] = torch.random(S, Z)
-
The MSE losses are not respected to sequence length, this would make the model learn padding values when the sequence lengths are not of equal length. This is issue should be highlighted at all calculations of MSE, especially in recovery and supervisor forward pass. This should not be an issue if the public dataset is being used.
timegan-pytorch/models/timegan.py
Line 414 in 7d04455
-
G_loss is wrong in logging, accidental addition of
torch.sqrt
that is not in original code
timegan-pytorch/models/utils.py
Line 120 in 7d04455
-
Paddings should be added during inference stage.
timegan-pytorch/models/utils.py
Line 271 in 7d04455
-
Original code has a sigmoid activation function. Although Hide-and-Seek competition did not added this if I'm not mistaken, probably heuristics.
timegan-pytorch/models/timegan.py
Line 150 in 7d04455
-
Arguments if the loss should be instance or stepwise. To be experimented.
Classification with Discriminator jsyoon0823/TimeGAN#11 (comment)