tianlinxu312 / cot-gan

COT-GAN: Generating Sequential Data via Causal Optimal Transport
37 stars 12 forks source link

Reproducing this work #4

Open CubicQubit opened 3 years ago

CubicQubit commented 3 years ago

Hi there,

I was wondering if the original authors have run into this error tensorflow/core/grappler/optimizers/meta_optimizer.cc:561] function_optimizer failed: Invalid argument: Input 0 of node zeros_like_72 was passed float from sequential/lstm/StatefulPartitionedCall:9 incompatible with expected variant. 2021-10-13 18:40:24.989984: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:561] function_optimizer failed: Invalid argument: Input 0 of node zeros_like_72 was passed float from sequential/lstm/StatefulPartitionedCall:9 incompatible with expected variant.

I got this while running python3.7.10 and installed the requirements.txt. The program still runs and outputs normally but it cannot learn the toy examples for sines very well. I was wondering if the above error is causing problems as I'm trying to run cotgan on some time-series data.

Training curve: 2021-10-13 20_44_41-Window

Real samples: Plot the first 4 dimensions for 8 samples, with increasing frequency for each dimension. real_sines

Generated samples: It learned the range but not the frequency / seasonality download

Config:

model_params:
  name: 'cotgan'
  reg_penalty: 10
  sinkhorn_eps: 100
  sinkhorn_l: 100
  nlstm: 1
  scaling_coef: 1

  z_dims_t: 10
  y_dims: 10

  g_state_size: 256
  d_state_size: 256
  g_filter_size: 32
  d_filter_size: 32
  disc_kernel_width: 5
  gen: 'lstm'

  batch_norm: True
  learning_rate: 0.001
tianlinxu312 commented 2 years ago

We have never seen this error before. You may need to google around and see if you can find a solution.

Is this sine function the same as we used in the paper? We also ran the model on 1D sine waves (didn't report in the paper as it's too simple), which can be learnt easily.